How to compare two spreadsheets

  • Thread starter Thread starter AJ
  • Start date Start date
A

AJ

Hi all,

I need a script (or any other idea) to compare two spreadsheets. I need to
read a cell from sheet A and serach for the same data in sheet B and if the
data is found it must be deleted from the sheet. Any ideas?
Thank you
 
The Find method can be used. This is the example from the help file...
'--
'..."finds all cells in the range A1:A500 that contain the value 2 and makes those cells gray"

With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Interior.Pattern = xlPatternGray50
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
--
Jim Cone
Portland, Oregon USA
http://tinyurl.com/XLCompanion

..
..
..

"AJ" <[email protected]>
wrote in message
Hi all,

I need a script (or any other idea) to compare two spreadsheets. I need to
read a cell from sheet A and serach for the same data in sheet B and if the
data is found it must be deleted from the sheet. Any ideas?
Thank you
 
Back
Top