cameronfraser
Programmer
How do I compare two headers on two separate Excel spreadsheets using VBA using range objects?
The headers are made up of a range of cells A1:Q3. On Sheet1 I set the header range as the object Range1. On Sheet2 I set the header range as Range2.
Worksheets("Sheet1".Range("A1","Q3".Select
Set Range1 = Selection
Worksheets("Sheet2".Range("A1","Q3".Select
Set Range2 = Selection
Now, How do I compare Range1 to Range2 to see if they each contain the same data.
The headers are made up of a range of cells A1:Q3. On Sheet1 I set the header range as the object Range1. On Sheet2 I set the header range as Range2.
Worksheets("Sheet1".Range("A1","Q3".Select
Set Range1 = Selection
Worksheets("Sheet2".Range("A1","Q3".Select
Set Range2 = Selection
Now, How do I compare Range1 to Range2 to see if they each contain the same data.