I have a pdf with as many as 7000 pages. The bill to numbers are grouped together. I would like to mark the last page with a B in the group of Bill to numbers.

Example:
Bill to: 1115
Bill to: 1115
Bill to: 1115 Last page mark with a B
Bill to: 6938
Bill to: 6938 Last page mark with a B
Bill to: 6632 Last page mark with a B
etc.

Would I do this with a condition?

Thank you,
Dan Stauder