• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Can someone help me with MACRO code comparison 2worksheets

mhuy87

New Member
Would someone please help me on this, I need a macro code for comparison two worksheets in excel finding MATCH value data in column A, and giving the result in sheet1, Thanks in advanced.

Sheet1

1691443126484.png

Sheet2
1691443167938.png
 
Either VLOOKUP or MATCH, I'm not sure which. But I'd like to know more about what you're looking for. Do you need to know which rows are the same, or which are different, or which part-number/reference pairs aren't equivalent, or what? You just said "comparison" but didn't say what you need to know.
 
Either VLOOKUP or MATCH, I'm not sure which. But I'd like to know more about what you're looking for. Do you need to know which rows are the same, or which are different, or which part-number/reference pairs aren't equivalent, or what? You just said "comparison" but didn't say what you need to know.
Hello Bob, i would like to have macro code either using Vlookup or Match, finding exact matching value data in column A Part# sheet1 and Column A Part# sheet2, giving result True for matching, false for mismatch, or matched for Matching, false or mismatch in Columns D sheet1. if this can be help. i appreciated, Thank you
 

mhuy87

You're writing to compare column A's (Part#).
Is it matter - how many Part#'s are in both sheets?
eg if Sheet1 has 4 x Part# 108183300 and Sheet2 has 8 x Part# 108183300 - is that 'match' or not?
 

mhuy87

You're writing to compare column A's (Part#).
Is it matter - how many Part#'s are in both sheets?
eg if Sheet1 has 4 x Part# 108183300 and Sheet2 has 8 x Part# 108183300 - is that 'match' or not?
i can removed duplicates in Columns A and Columns B on both sheets to find matching Part# on 5000rows on each sheet, pretty much to this image.
Sheet1
1691509235310.png
Sheet21691509253709.png
 

mhuy87

You seems to change Your output - me too.
I gotta use some other sample data.
Press [ Do It ] to get other sheets row if it matches.
... then You can see only matched Part#s.
 

Attachments

  • mhuy87.xlsb
    17.9 KB · Views: 7

mhuy87

You seems to change Your output - me too.
I gotta use some other sample data.
Press [ Do It ] to get other sheets row if it matches.
... then You can see only matched Part#s.
nothing changes.
can you help me with the macro for my 2worksheets findings matched
 

mhuy87

As I wrote - if 'match' then You'll get other sheets row
eg cell A2 has 10 and c2 has 31 ... means there is a match and that match is in row 31.
eg cell A29 has 99 and c29 is empty ... means there is no match.
 

mhuy87

As I wrote - if 'match' then You'll get other sheets row
eg cell A2 has 10 and c2 has 31 ... means there is a match and that match is in row 31.
eg cell A29 has 99 and c29 is empty ... means there is no match.
Nice, i see.
would you help me with the macro code giving result True/False, or Matched/False.
instead the value numbers. Thank you very much
 
....finding exact matching value data in column A Part# sheet1 and Column A Part# sheet2, giving result True for matching, false for mismatch, or matched for Matching, false or mismatch in Columns D sheet1....
I may still not have this right, but it sounds here as though you want to be able to look down the rows in Sheet1, and for each part# in col A it should show in col D either True (if that part# appears one or more times in Sheet2!A:A) or False (if that part# doesn't appear anywhere in Sheet2!A:A). Is that right? You don't care which row(s) in Sheet2 have that part#, or how many rows?

If so, you don't need a macro to do that; the solution you posted earlier today, just before noon my time, looks right. But if it's right, what more do you want? You certainly can write a VBA program if you want to; do you need to know how?
 

mhuy87

You've used one random color ...
This sample give more colors for those borders.
You can select which (Matched/UnMatched) You would like to see
as well as
You can select do You would like to see ALL or marked rows.
 

Attachments

  • mhuy87.xlsb
    36.2 KB · Views: 3
Last edited:
Back
Top