Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Two Ranges, Spot Different Values
I have two ranges in the same sheet where I want to know
if a cell's value is different between the "original" and the copy. The "in development" code below works but takes more than a few seconds to run. I'll be working thru ignoring some cells with formulas. I will be able to get the row/col values for the two ranges with their begining/ending row/col numbers. I'm not yet familiar with 'specialcells' functions. Can someone start me off with a more object oriented approach to comparing values between two ranges having exactly the same "shape" ? Thanks. Neal Z EndRow = 1847 'first range OffSet = 1000 'copied range is 1000 rows below end of 1st range. With Ws For Row = 1 To EndRow '2847 1st row of copy CheckRow = Row + EndRow + OffSet - 1 For Col = 5 To 100 'ignore cells with =row formulas as diff 'copy' row values do not matter. If InStr(.Cells(Row, Col).Formula, "=ROW") < 1 Then If .Cells(Row, Col).Value < .Cells(CheckRow, Col).Value Then TextA = .Cells(Row, Col).Value & " at row/col " _ & Row & "/" & Col & vbCr & .Cells(CheckRow, Col).Value _ & " at row " & CheckRow Debug.Print TextA Exit Sub End If End If Next Col Next Row End With -- Neal Z |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hosur an IT hot spot? | Excel Worksheet Functions | |||
Two Ranges, Spot Different Values | Excel Programming | |||
SPOT THE MISTAKE!.... | Excel Programming | |||
X marks the spot | Excel Programming | |||
I want a name in one spot and it's code in another | Excel Discussion (Misc queries) |