Hi

Am not sure if this is possible in Excel, so any advice would be great!

I have several worksheets that come from customers every day. They look kind of like this:


Code CUSTOMER SITE Identifier
ABCD EG1 31234
ABCD EG1 34343
ABCD EG1 65575
EFGH EG2 54354
EFGH EG2 45445
IJKLM EG3 43545

The problem I have is that each of the codes relate to a specific site and I want to produce a report just relating to those sites (codes) ie exclude the data relating to the other codes. I currently have several macro's that can do this but I have had to create a macro specific to each client, which then produces the reports from the code numbers. This is OK but we have lots of clients and hence lots of macros as I programme say customer X will have these site codes and to print for codes EG1 then EG2 and then EG3. What I would like is to consolidate this whole process into one Macro.

What I would like to happen is to open the Excel file from the customer and somehow Excel realises the first 3 rows are code ABCD, and query another file to verify the name of the customer (I have a file of all codes and which sites this relates to), produce a report for this site, go back to the original file and do the same for EFGH and so on. This way, it would prevent the need for hundereds for each client. Any ideas?

Darren