Hello Everyone.

On a daily basis, I work with about 15 different Excel files which need to be summarized and put into a daily dashboard. These files are created by different users / groups within the firm.

For each file, I create a copy of the data so my group has a copy, and I create a pivot table with the data needed for the dashboard.

I have created / written macros to do all of this, which I run on one file at a time. On some of these files, I need to add columns and do a series of Vlookups to fill in information I need. All of the macros and lookup tables are kept in a separate macro spreadsheet (but that has no relation to my question).

The problem I face is that sometimes different people create a particular spreadsheet, and they don't always keep the columns in the same order, and my macros rely on looking at specific columns. So, at best, the pivot tables are filled with #N/A values because columns weren't where they were supposed to be. At worst, the macro stops cold because it was expecting a particular column that's not there.

Is they any way in VBA to flag the specific columns I need based on the header name, then use that to look where those columns are to lookup the correct data?