Lookup Formula with two columns of data

Johnny Thunder

Well-known Member
Joined
Apr 9, 2010
Messages
693
Office Version
  1. 2016
Platform
  1. MacOS
Hello friends,



I am in need of guidance for a formula.

I have 4 columns of data,

Column A is a name, Column b is an amount. I need to match this criteria up to column C and D which is the same as A&B just not sorted and with many more names to search through.

Normally I would have used a Vlookup but I am not sure how this would work since I need to match two criteria? any help will be appreciated. Thanks

Excel 2007
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
One way would be to concatenate items and then do VLOOKUP like:
Column E:
=CONCATENATE(C1,D1)
Column F:
=CONCATENATE(A1,B1)
Column G:
Normal VLOOKUP i.e. searching F1 in E Column.
 
Upvote 0
You can use an array something like this

=INDEX(E1:E100,MATCH(A1&B1,C1:C100&D1:D100,0))

This returns a value from column E, where Column C&D match A1&B1

IMPORTANT
This is an array formula that requires CTRL + SHIFT + ENTER
After entering the formula, highlight the cell with the formula and press F2
Then press CTRL + SHIFT + ENTER
When entered correctly, the formula will be enclosed in {brackets}


Hope that helps.
 
Upvote 0
One way would be to concatenate items and then do VLOOKUP like:
Column E:
=CONCATENATE(C1,D1)
Column F:
=CONCATENATE(A1,B1)
Column G:
Normal VLOOKUP i.e. searching F1 in E Column.


Thank you! The formula worked great! Now I just need to add something to it, how would I write a addition to this formula to say: If it matches leave the cell blank if not give me "text" i will fill in the text with something like "Variance"
 
Upvote 0
In that case, you will have to modify the formula as below:
Code:
[COLOR=blue]=IF(ISERROR(VLOOKUP(F1,E:E,1,0)),"Variance","")[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

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