Thread: Cross Reference
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Steph[_6_] Steph[_6_] is offline
external usenet poster
 
Posts: 92
Default Cross Reference

Hi. Also, it is quite possible that the order of the data cells changes
from sheet1 to sheet2, which is totally fine. I don't care about the order,
just that each data cell in a given row on sheet1 exists somewhere on the
same row on sheet2. Thanks again!!

"crazybass2" wrote in message
...
Steph,

Put this code in Sheet1 (right click on Sheet1 tab, then select View Code)

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim rw As Integer
rw = ActiveCell.Row
For i = 4 To 53
If Not Cells(rw, i).Value = "" And Sheet2.Cells(rw, i).Value = "" Then
Cells(rw, i).Interior.ColorIndex = 6
Else
Cells(rw, i).Interior.ColorIndex = 0
End If
Next
End Sub

Each line you double click one Sheet1 will be compared to Sheet2

"Steph" wrote:

Hello. On Sheet1 I have a block of data that resides in an area from D7
thru BA5000. Each row contains at least 1 populated cell, but almost

all do
NOT go thru BA.

On Sheet2, I have a revised data set within the same range. Can I cross
reference the data in Sheet1 with Sheet2 and highlight each cell in

Sheet1
that does not exist in Sheet2? I need to check each row independently

(ie
check row 7 in sheet1 to see if something is not in row 7 of sheet2).

Basically, 2 reports are generated at 2 different points in time. I

need to
make sure that the cells on a given row on sheet1 still exist somewhere

on
row 7 in sheet2.

Thanks!