LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Comparing Problems



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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
aauugghhh...#div/o problems & various average formula problems acbel40 Excel Worksheet Functions 5 October 19th 09 05:00 PM
Comparing more than two Vern Excel Worksheet Functions 4 September 24th 08 04:03 PM
Problems comparing data from multiple blank cells monkeyhop Excel Worksheet Functions 4 May 2nd 06 05:48 AM
Problems merging an excel file due to code or file problems? Cindy M -WordMVP- Excel Programming 0 September 14th 04 02:58 PM
Comparing Kirk[_4_] Excel Programming 1 December 2nd 03 08:35 PM


All times are GMT +1. The time now is 06:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"