Compare Column Headings and Delete Nonmatch

  • Thread starter Thread starter bthurman
  • Start date Start date
B

bthurman

Any help on the situation below would be greatly appreciated.

I am trying to write VBA code to accomplish the following.


I am working with 2 seperate files. Let's refer to them as (File 1) and
(Template 1).

After opening (File 1), I need to compare the number of columns with
headings to the number of columns with headings in
(Template 1). If the number of columns in (File 1) exceeds the number in
(Template 1) than I must now examine each of the column headings in (File 1)
to determine which of these does not exist in (Template 1). I will delete the
entire column from (File 1) after determining which it is.

Thanks in advance for your help.

Bob
 
Leith,

Your solution is just what I needed. Works great. Thanks so much for your
help.

Bob
 
Back
Top