Lookup value with 2 criteria

Jonathan Lee

New Member
Joined
Feb 22, 2015
Messages
33
Office Version
  1. 2016
Platform
  1. Windows
Hi Sifus,

I have a table below where I need to do a lookup value according to the months and the cells on the left side.

I need to be able to retrieve say Feb, Orange.. value is 5.

How can I do this?

Thanks in advance.

JanFebMarAprMay
Apple1471013
Orange2581114
Pear3691215
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Book2
ABCDEF
1JanFebMarAprMay
2Apple1471013
3Orange2581114
4Pear3691215
5
6MonthFeb
7ProductOrange
8Lookup5
Sheet1
Cell Formulas
RangeFormula
C8C8=IFNA(INDEX($B$2:$F$4,MATCH($C$7,$A$2:$A$4,0),MATCH($C$6,$B$1:$F$1,0)),"")
 
Upvote 0
Book2
ABCDEF
1JanFebMarAprMay
2Apple1471013
3Orange2581114
4Pear3691215
5
6MonthFeb
7ProductOrange
8Lookup5
Sheet1
Cell Formulas
RangeFormula
C8C8=IFNA(INDEX($B$2:$F$4,MATCH($C$7,$A$2:$A$4,0),MATCH($C$6,$B$1:$F$1,0)),"")
Thanks!!!

Just one more thing, the list could go longer, meaning there will be more rows. Can we index and match based on the whole column?
 
Upvote 0
I always recommend converting your data into a table, this keeps your sheet running the fastest. You only need to set your formula once.

You can do it for the whole column, this may cause your sheet to get slower as it gets larger, because the formula is calculating rows it doesn't need to.
 
Upvote 0
Can we index and match based on the whole column?
Not advisable but you could use a range that is larger than needed, without going stupid like
Excel Formula:
=IFNA(INDEX($B$2:$F$5000,MATCH(G2,$A$2:$A$5000,0),MATCH(G3,$B$1:$F$1,0)),"")
Change the G2 & G3 to the cells with your criteria
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,261
Members
448,558
Latest member
aivin

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