Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sue Sue is offline
external usenet poster
 
Posts: 285
Default Comparing 2 worksheets in Excel 2007

I am trying to compare 2 worksheets in a large workbook. One sheet is named
1st Proposed HMIs. The other is named 2nd Proposed HMIs. Both spreadsheets
are exactly the same. I would like to compare the 2nd sheet with the 1st
sheet and have Excel highlight or shade any cell that has changed or
different data in the 2nd sheet. Any ideas? Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Comparing 2 worksheets in Excel 2007

Try this:
http://www.softinterface.com/MD/Docu...n-Software.htm

Or, this code:
Sub Compare2Shts()
For Each Cell In Worksheets("CompareSheet#1").UsedRange
If Cell.Value < Worksheets("CompareSheet#2").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next

For Each Cell In Worksheets("CompareSheet#2").UsedRange
If Cell.Value < Worksheets("CompareSheet#1").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next
End Sub


Sub CompareAnother2Shts()
For Each Cell In Worksheets("CompareSheet#1").Range("A1:J50")
If Cell.Value < Worksheets("CompareSheet#2").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next

For Each Cell In Worksheets("CompareSheet#2").Range("A1:J50")
If Cell.Value < Worksheets("CompareSheet#1").Range(Cell.Address) Then
Cell.Interior.ColorIndex = 3
End If
Next
End Sub
'...change the range to suit your needs.

HTH,
Ryan

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Sue" wrote:

I am trying to compare 2 worksheets in a large workbook. One sheet is named
1st Proposed HMIs. The other is named 2nd Proposed HMIs. Both spreadsheets
are exactly the same. I would like to compare the 2nd sheet with the 1st
sheet and have Excel highlight or shade any cell that has changed or
different data in the 2nd sheet. Any ideas? Thanks!

Reply
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
Excel 2007 comparing dates Jeri Excel Discussion (Misc queries) 5 May 8th 08 04:08 PM
Comparing worksheets enna49 Excel Worksheet Functions 2 May 30th 07 06:54 AM
comparing excel 2003 and excel 2007 tjccs4 Excel Discussion (Misc queries) 4 February 12th 07 02:06 PM
Comparing two different Worksheets senthilmca Excel Worksheet Functions 0 June 1st 06 06:36 AM
Comparing worksheets in Excel and highlighting changes Michael Ubezzi Excel Worksheet Functions 0 January 31st 06 12:13 AM


All times are GMT +1. The time now is 12:26 PM.

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

About Us

"It's about Microsoft Excel"