Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Compare a Worksheet to another Worksheet.
Hello, any help would be appreciated.
I have two spread sheets, the data elements should be the same. So we must verify this. Is there a way to compare a spread sheet to another spread sheet to see the differences? -- Thanks Susan |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Compare a Worksheet to another Worksheet.
Susan
This little macro will do that. I assumed your two sheets were named "One" and "Two", and the range to be checked is A1:P100. Change all that as needed. As written, this macro will compare each cell in sheet "One" with the same cell in sheet "Two", and will color the cell in sheet "One" red if the values are not the same. Post back if you need more. HTH Otto Sub CompareSheets() Dim Rng1 As Range Dim i As Range Sheets("One").Select Set Rng1 = Range("A1:P100") With Sheets("Two") For Each i In Rng1 If i.Value < .Range(i.Address).Value Then _ i.Interior.ColorIndex = 3 Next i End With End Sub "Susan@seaboard" wrote in message ... Hello, any help would be appreciated. I have two spread sheets, the data elements should be the same. So we must verify this. Is there a way to compare a spread sheet to another spread sheet to see the differences? -- Thanks Susan |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Compare a Worksheet to another Worksheet.
If you don't want to do the programming... the commercial Excel add-in "XL Companion" (from yours truly) can make several different types of worksheet comparisons. See... http://www.realezsites.com/bus/primitivesoftware -- Jim Cone San Francisco, USA (Excel Add-ins / Excel Programming) "Susan@seaboard" wrote in message Hello, any help would be appreciated. I have two spread sheets, the data elements should be the same. So we must verify this. Is there a way to compare a spread sheet to another spread sheet to see the differences? -- Thanks Susan |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Compare a Worksheet to another Worksheet.
Otto, I got usae from your macro However the 2 files i am comparing have their data arranged to different collums For example File A its colum 1 starts at row 2 whereas this colum infile B is moved to colum 5 and starts at row 3. Is there a way since this relation is always the same to define those relations as an offset and continue to use your macro? Ο χρήστης "Otto Moehrbach" *γγραψε: Susan This little macro will do that. I assumed your two sheets were named "One" and "Two", and the range to be checked is A1:P100. Change all that as needed. As written, this macro will compare each cell in sheet "One" with the same cell in sheet "Two", and will color the cell in sheet "One" red if the values are not the same. Post back if you need more. HTH Otto Sub CompareSheets() Dim Rng1 As Range Dim i As Range Sheets("One").Select Set Rng1 = Range("A1:P100") With Sheets("Two") For Each i In Rng1 If i.Value < .Range(i.Address).Value Then _ i.Interior.ColorIndex = 3 Next i End With End Sub "Susan@seaboard" wrote in message ... Hello, any help would be appreciated. I have two spread sheets, the data elements should be the same. So we must verify this. Is there a way to compare a spread sheet to another spread sheet to see the differences? -- Thanks Susan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compare a value and if is true copy the line to other worksheet | Excel Worksheet Functions | |||
How to compare two numeric column in same worksheet | Excel Worksheet Functions | |||
compare two columns within a worksheet, then highlight duplicates | Excel Worksheet Functions | |||
I need to compare two worksheets and create a new worksheet | Excel Discussion (Misc queries) | |||
How do I Compare worksheet columns | Excel Worksheet Functions |