Solved

excel 2007 - i have two columns A and B and i would like to compare if any row which included A and B are existing in other spreadsheet in same columns aA and B

Posted on 2014-10-11
2
72 Views
Last Modified: 2014-10-14
what is the script for comparing columns A and B in one sheet with other sheet also same columns A AND B

thanks
Gvilbis
0
Comment
Question by:gvilbis
2 Comments
 
LVL 15

Assisted Solution

by:Haris Djulic
Haris Djulic earned 250 total points
ID: 40375153
Hello,

as I understand you want to check if value in row with two columns exist in another sheet . You can use VLOOKUP bu t you need to create new column which you will use to compare.

Steps:

1. In sheet where you want the results cell C1 je add this formula : =+CONCATENATE(A2;B2) - strech this formula to all rows
2. n sheet where you have the values to check in the cell C1 je add this formula : =+CONCATENATE(A2;B2)  - strech this formula to all rows
3. In sheet where you want  in thecell D1 you add this formula: =+VLOOKUP(C2;Sheet2!C:C;1;FALSE)

I attached the example excel file..
Book1.xlsx
0
 
LVL 25

Accepted Solution

by:
ProfessorJimJam earned 250 total points
ID: 40375220
hello,

I bet you may not  find a better solution with VBA other the code attached.

code was wirrten by Excel MVP JoeMo.

run the macro called CompareSheets2 and then it will follow along.
F--File.xlsm
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now