Vlookup or Index match multiple criteria

Caly

Board Regular
Joined
Jul 19, 2015
Messages
159
Office Version
  1. 365
  2. 2013
  3. 2011
  4. 2010
  5. 2007
Platform
  1. Windows
Hi I have a table with cost data that I’m using index match for but now I want to add to that additional criteria to apply but struggling with applying the vlookup if that is correct or not.

This is the table chart for the cost data in columns A through C:
Col A. Col B. Col C.
1. Start. End. Floor.
2. $0.00. $2.00. 35%
3. $2.01. $4.00. 18%

The initial formula was just looking at the cost of the item to bring in what the floor percent value is for it based on its cost. And this is in the data tab with the formula in column C. Below is that formula:
B:
Col A. Col B. Col C.
1. Category. Cost. Formula for the floor
2. Apple. $2.60. 18%

=if(index(‘cost tab’!$C$2:$C$3,
match($C2,’cost tab’!$B$2:$B$3,1))

But now I need to also look at if the category says Apple or anything else added to a tab taht will have different categories and then values for those taht will be different from the standard values in the cost tab. I was trying to do a vlookup but I’m getting a SPILL error message.

Below is the category table

Col A Col B
1. Category. Percentage
2. Apple. 10%
3. Grape. 2%
4. Kiwi. 5%


I was trying to do this in front of the other formula but getting an error message of #SPILL!
=if($A2=vlookup(‘category table’!$A$2:$A$4,1,false),vlookup($A2,’category table’!$A$2:$B$4,2,false),

Thank you so much
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Maybe something like below?
Book1
ABCDEFGHIJKLM
1categorycostfloorEndFloorCategoryPct
2apple2,610%035%apple10%
3kiwi3,45%235%grape2%
4orange5,118%418%kiwi5%
5pear1,9835%
6
Sheet1
Cell Formulas
RangeFormula
C2:C5C2=IFNA(XLOOKUP(A2:A5,$K$2:$K$4,$L$2:$L$4),XLOOKUP(B2:B5,$G$2:$G$4,$H$2:$H$4,,-1,2))
Dynamic array formulas.


Strangely enough without IFNA( ), using the build in "if not found" of XLOOKUP( ), gives another result. :unsure:
Book1
ABCDEFGHIJKL
1categorycostfloorEndFloorCategoryPct
2apple2,610%035%apple10%
3kiwi3,45%235%grape2%
4orange5,135%418%kiwi5%
5pear1,9835%
Sheet1
Cell Formulas
RangeFormula
C2:C5C2=XLOOKUP(A2:A5,$K$2:$K$4,$L$2:$L$4,XLOOKUP(B2:B5,$G$2:$G$4,$H$2:$H$4,,-1,2))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,215,365
Messages
6,124,513
Members
449,168
Latest member
CheerfulWalker

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