PC Review


Reply
Thread Tools Rate Thread

compare contents between sheets and identify matching values

 
 
nanda
Guest
Posts: n/a
 
      3rd Nov 2007
i want a macro script to compare contents in first sheet first column
with the contents in second sheet first column. please assist.

thanks,
nanda

 
Reply With Quote
 
 
 
 
Satish
Guest
Posts: n/a
 
      3rd Nov 2007
On Nov 3, 5:02 pm, nanda <nandakuma...@gmail.com> wrote:
> i want a macro script to compare contents in first sheet first column
> with the contents in second sheet first column. please assist.
>
> thanks,
> nanda



Try this...ofc there can be better options...but this shld also work

For i = 1 To 100
For j = 1 To 100
If Worksheets(1).Cells(i, 1).Value = Worksheets(2).Cells(j,
1).Value Then
'do whatever if match is found
Exit For
End If
Next j
Next i

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compare two sheets, identify values, calculate delta - Pls help Hannes Microsoft Excel Programming 7 7th Aug 2008 09:55 PM
Compare 2 sheets and copy matching data Sarah Microsoft Excel Programming 3 18th Jul 2007 04:47 PM
Could someone please help me w/ matching the contents of each two sheets? bxc2739 Microsoft Excel Misc 4 26th Apr 2006 11:04 PM
HOW DO I COMPARE TWO SHEETS AND IDENTIFY WHICH CELLS DIFFER =?Utf-8?B?U1RFVkUgVEhFIFBBUlRTIEdVWQ==?= Microsoft Excel Misc 1 2nd Mar 2006 07:13 PM
Macro to compare values and return exact matching value lloyd@polkoilco.com Microsoft Excel Programming 1 2nd Jan 2004 11:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:34 PM.