Excel Returns a Value based on multiple criteria

jdcp

New Member
Joined
Feb 3, 2023
Messages
3
Office Version
  1. 2003 or older
Platform
  1. Windows
Hello,

I'm trying to figure out a formula where in Excel will return a result in B12 based on a text value (B10) and a number range (B1. please see table below:

I've been at it for hours and hours using xlookup, vlookup, index, match but could seem to get it to work. I am still a beginner though. any help would be greatly appreciated. thanks!

BESTBESTGOODGOODBADBAD
group A0%55.0110%10.01
100%​
group B0%1010.0120%20.01
100%​
group C0%2020.0130%30.01
100%​
group D0%3030.0155%55.01
100%​
CRITERIAS
GROUPGROUP B<---variable
RANGE
15%​
<---variable
RATINGGOOD<---returned result
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Convert all of your values in B2:G5 to numbers, e.g. 0, 5, 5.01, 10, 100. Not a mix of numbers and percents (which are decimal numbers between 0 and 1). Then use:
Excel Formula:
=IF(OR(B10="",B11=""),"",INDEX(B1:G1,MATCH(B11,INDIRECT("B"&MATCH(B10,A1:A5,0)&":G"&MATCH(B10,A1:A5,0)),1)))
 
Upvote 1
Solution
Convert all of your values in B2:G5 to numbers, e.g. 0, 5, 5.01, 10, 100. Not a mix of numbers and percents (which are decimal numbers between 0 and 1). Then use:
Excel Formula:
=IF(OR(B10="",B11=""),"",INDEX(B1:G1,MATCH(B11,INDIRECT("B"&MATCH(B10,A1:A5,0)&":G"&MATCH(B10,A1:A5,0)),1)))
thank you very much, Z51! this solved. I really appreciate the help.
 
Upvote 0
You had mixed values in your percentages, I changed them to integers. YOu can reformat if you think this works for you:
Indirect is a volatile function and can slow down spreadsheets with lots of lookups.

Mr Excel Questions2.xlsx
ABCDEFG
1
2BESTBESTGOODGOODBADBAD
3group A0.005.005.0110.0010.01100%
4group B0.0010.0010.0120.0020.01100%
5group C0.0020.0020.0130.0030.01100%
6group D0.0030.0030.0155.0055.01100%
7
8
9
10CRITERIAS
11GROUPGROUP D<---variable
12RANGE56.00<---variable
13RATINGBAD<---returned result
Sheet2
Cell Formulas
RangeFormula
B13B13=INDEX($A$2:$F$2,1,MATCH($B$12,OFFSET(INDEX($A$2:$A$6,MATCH($B$11,$A$2:$A$6,0)),0,0,1,COLUMNS($A$2:$F$2))))
 
Upvote 1
You had mixed values in your percentages, I changed them to integers. YOu can reformat if you think this works for you:
Indirect is a volatile function and can slow down spreadsheets with lots of lookups.

Mr Excel Questions2.xlsx
ABCDEFG
1
2BESTBESTGOODGOODBADBAD
3group A0.005.005.0110.0010.01100%
4group B0.0010.0010.0120.0020.01100%
5group C0.0020.0020.0130.0030.01100%
6group D0.0030.0030.0155.0055.01100%
7
8
9
10CRITERIAS
11GROUPGROUP D<---variable
12RANGE56.00<---variable
13RATINGBAD<---returned result
Sheet2
Cell Formulas
RangeFormula
B13B13=INDEX($A$2:$F$2,1,MATCH($B$12,OFFSET(INDEX($A$2:$A$6,MATCH($B$11,$A$2:$A$6,0)),0,0,1,COLUMNS($A$2:$F$2))))
whoa. that seems to work too. today I learned that you can use different formulas and arrive at the same answer. thanks very much too!
 
Upvote 0
whoa. that seems to work too. today I learned that you can use different formulas and arrive at the same answer. thanks very much too!
in most situations that can happen. But they all have something that help or detracts from your system and solution.
1 + 3 + "ALJD" and SUM(1,3,"ALJD") . Adding with the plus operator will work MOST of the time, but will fail if there is text in one of the cells.

The INDIRECT function is a great function, but because of the way it works it can really bog workbooks down if they have lots of LOOKUP and matching calculations. Try to avoid it when possible.
 
Upvote 1

Forum statistics

Threads
1,214,979
Messages
6,122,557
Members
449,088
Latest member
davidcom

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