How to compare two spreadsheets

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
 
J

Jim Cone

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top