ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help... (https://www.excelbanter.com/excel-programming/290809-help.html)

nem[_5_]

help...
 
i would like to compare information that i have on two seperate workboo
files. each one has the same column headings that i would like t
compare the other file with...

ex:

file1 column A compared by file2 column A so and so forth

as well as, retain the column headings to be able to go back and sor
the columns with the sort filter

ex:

sort by column c


thank

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

help...
 
With workbooks("file1.xls").Worksheets(1)
set rng1 = .range(.cells(1,1),.cells(rows.count,1).End(xlup))
End With

With workbooks("file2.xls").Worksheets(1)
set rng2 = .range(.cells(1,1),.cells(rows.count,1).End(xlup))
End With

for each cell in rng1
if cell < rng2(cell.row) then
msgbox "there is a difference
exit sub
end if
Next


--
Regards,
Tom Ogilvy



nem wrote in message
...
i would like to compare information that i have on two seperate workbook
files. each one has the same column headings that i would like to
compare the other file with...

ex:

file1 column A compared by file2 column A so and so forth

as well as, retain the column headings to be able to go back and sort
the columns with the sort filter

ex:

sort by column c


thanks


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 11:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com