Hi,
I have a spreadsheet for printing a single page report that mostly relies on Index/Match, sumifs, and a few simple macros to run through a variable list of values and print every unique value in a list.
The unique value is the item number, which is populated in a cell, other cells use Index/Match and sumifs based on the item number to pull the relevant data from a data dump on another worksheet, then print report sheet. Repeat for each value.
I can have repeat item numbers in the same account (hence the sumif) which is correct, but I am running into issues when the same item number is used in two separate accounts.
For the most part, item numbers won't overlap between accounts, but there are times where the same item number will appear in two different accounts at the same time. Because the sheets are all being driven my Index/Match, it is pulling the first data point (and correctly printing it) and then bypassing the rest.
How can I write a macro that will identify the duplicate item numbers when they are being used in a 2nd account, highlight the rows, and then put a message box with their location?
There shouldn't be too many overlaps when a report is run so I am more concerned about just identifying which line items are being "skipped over".
I have attached a sample worksheet.
Bookmarks