VLOOKUP in Column A, IFERROR, look in Column B, return value in Column C

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I understand how to use VLOOKUP to find the information in column A and return the value in column C, however I don't fully understand how to incorporate a second column to look in. If the value isn't found in column A, I need the formula to then look in Column C. If the value is in column A, return the value in column C. If the value is not in column A, look for the value in column B then return the value in column C. Is this possible?
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Absolutely!
Excel Formula:
=VLOOKUP([@Code],Library[[Company Color Code]:[Product-Name]],3,FALSE)
This looks in column A (Company Color Code) and returns the information in column C (Product-Name). I need to also check column B (Valspar Number) if there is no value in Column A, and return the information in Column C.
 
Upvote 0
Thanks for that.
How about
Excel Formula:
=XLOOKUP([@Code],Library[Company Color Code],Library[Product-Name],XLOOKUP([@Code],Library[Valspar Number],Library[Product-Name],,0),0)
 
Upvote 0
Solution
Thanks for that.
How about
Excel Formula:
=XLOOKUP([@Code],Library[Company Color Code],Library[Product-Name],XLOOKUP([@Code],Library[Valspar Number],Library[Product-Name],,0),0)
You ROCK! Thank you! It works!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,955
Members
449,199
Latest member
Riley Johnson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top