Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default compare data on 2 sheets

This is what am looking to do,

To compare data or two sheets

So say sheet2 G4=exceltip

and in sheet1 it then searches though G:G finds that cell G100 of shee
1 matches then it places X in cell H4 of sheet2

And Does this until Cell G# is empty

Thanks
Pau

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default compare data on 2 sheets

Paul,

Sub TryNow()
Dim myCell As Range
Dim myFind As Range

With Worksheets("Sheet2")
For Each myCell In .Range(.Range("G4"), .Range("G4").End(xlDown))
Set myFind = Worksheets("Sheet1").Range("G:G").Find(myCell.Valu e)
If Not myFind Is Nothing Then myCell(1, 2).Value = "X"
Next myCell
End With

End Sub

You could also do this with a formula in Column H....

HTH,
Bernie
MS Excel MVP

"pauluk " wrote in message
...
This is what am looking to do,

To compare data or two sheets

So say sheet2 G4=exceltip

and in sheet1 it then searches though G:G finds that cell G100 of sheet
1 matches then it places X in cell H4 of sheet2

And Does this until Cell G# is empty

Thanks
Paul


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default compare data on 2 sheets

A simple VLOOKUP should do the job. In cell H4 put formula :-
=IF(ISERROR(VLOOKUP(G4,Sheet1!G:G,1,FALSE)),"","X" )

and copy down

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default compare data on 2 sheets

Brian,

Yes, your formula will work, but this is the programming group. So,
perhaps, post code to put that formula into cell H4 and to copy it down to
match column G. The OP may also not want formulas, so also include code to
convert those formulas to values.

Bernie
MS Excel MVP

"BrianB " wrote in message
...
A simple VLOOKUP should do the job. In cell H4 put formula :-
=IF(ISERROR(VLOOKUP(G4,Sheet1!G:G,1,FALSE)),"","X" )

and copy down.


---
Message posted from http://www.ExcelForum.com/



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
how can I compare two data sheets to find variances? lizm Excel Discussion (Misc queries) 1 December 1st 09 11:49 PM
How can I compare data between two different sheets for changes? vortec802 Excel Worksheet Functions 0 October 9th 07 10:10 PM
Compare two wk sheets with common data using copy paste macro conejo Excel Worksheet Functions 0 October 8th 07 09:21 AM
how to compare two columns on two sheets and copy associated data from one sheet to the other? [email protected] Excel Worksheet Functions 2 June 22nd 07 03:40 PM
how to compare data in two different work sheets Melanie Excel Worksheet Functions 2 January 18th 07 04:21 AM


All times are GMT +1. The time now is 12:31 AM.

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"