Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need formula example

Posted on 2014-01-24
2
Medium Priority
?
261 Views
Last Modified: 2014-01-24
In the attached spreadsheet, I seek to find duplicate ID numbers between Column A (List 1) and Column D (List 2). You will notice that the values of E3 and F3 (both have bad data) does not equal the values of B4 and C4, though they are associated with the same ID.  In column G (Matched), a formula drops in the duplicated ID numbers.

In this example, I want H4 and I4 to contain the (bad) data from E3 and F3, but only because the data is mismatched. If it all matched correctly, I would want the matched name and address to remain blank, like what you see with the matched ID 5 in G7.

What formula is required in H4 and I4?
Book1.xlsx
0
Comment
Question by:K_Deutsch
2 Comments
 
LVL 81

Accepted Solution

by:
byundt earned 2000 total points
ID: 39808015
Here are two formulas for cells H3 and I3:
=IF($G3="","",IF($B3=VLOOKUP($A3,$D:$F,2,FALSE),"",VLOOKUP($A3,$D:$F,2,FALSE)))
=IF($G3="","",IF($C3=VLOOKUP($A3,$D:$F,3,FALSE),"",VLOOKUP($A3,$D:$F,3,FALSE)))

If G3 displays a blank, the formulas return a blank. If G3 displays a number but the corresponding data in B3 doesn't match column E, the first formula returns the mismatched value from column E. Otherwise, it returns an empty string.
0
 

Author Closing Comment

by:K_Deutsch
ID: 39808058
Perfect, thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

876 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