ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to compare two spreadsheets (https://www.excelbanter.com/excel-programming/443639-how-compare-two-spreadsheets.html)

AJ[_9_]

How to compare two spreadsheets
 
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



Jim Cone[_2_]

How to compare two spreadsheets
 
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"
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




All times are GMT +1. The time now is 07:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com