I won't write the entire solution. Ihave poste code like this plenty of
time but will explain the process
Set SourceSht = workbooks("book1.xls")
Set DestSht = workbooks("book2.xls")
with Sourcesht
for colcount = 1 to 5
HeaderName = .Cells(1,ColCount)
with DestSht
set c = .rows(1).find)what:=HeaderName, _
lookin:=xlvalues,lookat:xlwhole)
if c is nothing then
msgbox("Cannot find Header : " & HeaderName)
else
'c.column is the matching column in the destination sheet
end if
end with
next colcount
end with
--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=179210
Microsoft Office Help