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
74 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

776 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