Pull data from table using multiple criteria

Viking1221

New Member
Joined
May 25, 2017
Messages
32
Hello,

My colleagues and I are are stumped on a formula we are trying to build to pull in the correct assumptions based on multiple criteria across rows and columns. I attached a sample spreadsheet of what we are trying to do. We want to pull in the correct number that corresponds to the table. So for this example if we have a dollar $ between the MID and MAX amounts in the columns of $1,100 and a corresponding % variance of 10% (between the -5 and -15%) we want the formula to extract the 35%.

So far all our attempts have failed and we do not want to do this via a macro, but want a formula to do the work.

If anyone has any ideas or knows how to the this please share.

I have a sample version of a file located here: Sample

Thanks
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
I never download just copy a few rows and paste in the reply box


Here is a sample below. In this example, we have a $ variance of $1,100 and a % variance of -10%. So we need to pull in the -30% since $1,100 is between $1,001 and $1,250 and a Variance of -10% which is between -5% and -15%
MinMax-5%-15%-25%-40%
02500.0%0.0%0.0%0.0%
2515000.0%0.0%0.0%-5.0%
501750-10.0%-10.0%-10.0%-15.0%
7511,000-20.0%-20.0%-20.0%-25.0%
1,0011,250-30.0%-30.0%-30.0%-50.0%
1,2511,500-50.0%-50.0%-50.0%-75.0%
1,5011,750-75.0%-75.0%-75.0%-75.0%

<tbody>
</tbody><colgroup><col><col span="5"></colgroup>
 
Upvote 0
Welcome to Mr Excel

Question
What are the expected results for
1100 and -4%
1100 and -30%

M.
 
Upvote 0
Try


A
B
C
D
E
F
G
H
I
J
1
Min​
Max​
-5%​
-15%​
-25%​
-40%​
Crit1​
Crit2​
Result​
2
0​
250​
0,00%​
0,00%​
0,00%​
0,00%​
1100​
-10%​
-30,00%​
3
251​
500​
0,00%​
0,00%​
0,00%​
-5,00%​
1100​
-4%​
-30,00%​
4
501​
750​
-10,00%​
-10,00%​
-10,00%​
-15,00%​
1100​
-30%​
-50,00%​
5
751​
1000​
-20,00%​
-20,00%​
-20,00%​
-25,00%​
6
1001​
1250​
-30,00%​
-30,00%​
-30,00%​
-50,00%​
7
1251​
1500​
-50,00%​
-50,00%​
-50,00%​
-75,00%​
8
1501​
1750​
-75,00%​
-75,00%​
-75,00%​
-75,00%​

<tbody>
</tbody>


Criteria in columns H:I

Formula in J2 copied down
=INDEX($C$2:$F$8,MATCH(H2,$A$2:$A$8),IFERROR(MATCH(I2,$C$1:$F$1,-1)+1,1))

Hope this helps

M.
 
Last edited:
Upvote 0
oops...the formula needs a small adjustment (to handle cases where there is an exact match in C1:F1)

New version
=INDEX($C$2:$F$8,MATCH(H2,$A$2:$A$8),IFERROR(MATCH(I2,$C$1:$F$1,-1)+1*ISNA(MATCH(I2,$C$1:$F$1,0)),1))

M.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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