Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Private Sub Compare() Dim x, y As Integer Dim r, s As Variant I'm trying to compare the contents of two worksheets, highlighting the diffferences. I thought it would be simple, and created the following - which doesn't work. Application.ScreenUpdating = False For y = 1 To 25 For x = 1 To 100 Worksheets("D390").Select r = Cells(x, y).Text Worksheets("D390New").Select s = Cells(x, y).Text If s < r Then Cells(x, y).Select With Selection.Interior .ColorIndex = 6 End With End If Next Next End Sub Could someone please explain what I've misssed or done wrong? Thanks Jim Berglund |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
aauugghhh...#div/o problems & various average formula problems | Excel Worksheet Functions | |||
Comparing more than two | Excel Worksheet Functions | |||
Problems comparing data from multiple blank cells | Excel Worksheet Functions | |||
Problems merging an excel file due to code or file problems? | Excel Programming | |||
Comparing | Excel Programming |