Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

Using Vlookup to match column info

0

I'm new to using vlookup and struggling to pull my info together. As a newbie can someone give me some function help to get the info where I need it. In the attached spreadsheet I am trying to combine the info in the two tables so that the con note numbers in column A are on the same line as the same order numbers in column F. I just can't figure out how. I have attached my file so you know what I am talking about. Thanks.

Answer
Discuss

Answers

0

In column I of your example you might use this function.

=VLOOKUP($A3,$E$3:$G$64,2,FALSE)

VLOOKUP looks for the value found in A3 in the first column of the range E3:G64. From the row in which an exact match is found (FALSE means "exact") the value in column 2 of the search range will be returned. The second column of E3:G64 is column F. If you want the AUD value, change this number to 3.

If no match is found an #N/A error occurs, and this error will be propagated to any total you try to draw from column I. In order to avoid that you can embed the above formula in an ISERROR() function.

=IFERROR(VLOOKUP($A3+100,$E$3:$G$64,2,FALSE),"Not found")

Excel's SUM() function will interpret "not found" as 0 and you will have a total at the bottom which looks OK but might be wrong. So, you must decide whether you want to show a wrong total or no total at all - in case of error only.

Discuss


Answer the Question

You must create an account to use the forum. Create an Account or Login