Lookup value in two columns/cells and return a value from a different column

Bav_2030

New Member
Joined
Nov 18, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have two columns with values and want to check both cells in a row (A2 and B2) and depending on the value found return the quantity from sheet 2 column 2

Both corresponding cells (A2 and B2) will not have data but there will be data in either of them.

RowColumn AColumn B
2Pears
3Apples
4Pears
5Orange
6Grapes
7Peach

Sheet 2
FruitsQuantity
Pears10
Applies2
Orange3
Peach5
Grapes4
Kiwi8


I have tired various Vlookup and with concatenate field as a helper but can't get it to work, any help would be appreciated :)
=VLOOKUP(A2&B2,'Sheet 2'!A:B,2)
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Are the blank cells in the 1st sheet totally empty, or do they have a formula?
 
Upvote 0
In that case how about
Excel Formula:
=VLOOKUP(A2&B2,'Sheet 2'!A:B,2,0)
 
Upvote 0
Solution
In that case how about
Excel Formula:
=VLOOKUP(A2&B2,'Sheet 2'!A:B,2,0)
Oh my god, it has worked, I just realised there were some spaces in the blank cells! - thank you for all your help :)
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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