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
77 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 26

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

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…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

856 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