Help in Lookup Range

Jerome_RA

Board Regular
Joined
Dec 26, 2016
Messages
53
Office Version
  1. 2013
Platform
  1. Windows
Hi Everyone.

Maybe you can help me with this question.
I have here an example with this range of data.
Data below is the RAW.
What I want to do is to get the Overall Score from the Unique Column which is the Description and Month containing what Range there Grades are. So for Instance, I have 98.5% on Math for July. So the Score would be 4.

Description and Month are just a sample. This could be a whole year (January - December) with lots of Description entered. So the Data below is just a sample of what I want to get the formula.

UIDDescriptionMonthFromToOverall Score
MathJuly

<tbody>
</tbody><colgroup><col></colgroup>

<tbody>
</tbody><colgroup><col></colgroup>
Math

<tbody>
</tbody><colgroup><col></colgroup>
July99%99999%5
MathJuly

<tbody>
</tbody><colgroup><col></colgroup>
Math

<tbody>
</tbody><colgroup><col></colgroup>
July97.5%98.99%4
MathJuly
Math

<tbody>
</tbody><colgroup><col></colgroup>
July95%97.49%3
MathJuly
Math

<tbody>
</tbody><colgroup><col></colgroup>
July90%94.99%2
MathJuly
Math

<tbody>
</tbody><colgroup><col></colgroup>
July0%89.99%1
ScienceAugust

<tbody>
</tbody><colgroup><col></colgroup>
Science

<tbody>
</tbody><colgroup><col></colgroup>
August99%99999%5
ScienceAugust

<tbody>
</tbody><colgroup><col></colgroup>
Science

<tbody>
</tbody><colgroup><col></colgroup>
August97.5%98.99%4
ScienceAugust

<tbody>
</tbody><colgroup><col></colgroup>
Science

<tbody>
</tbody><colgroup><col></colgroup>
August95%97.49%3
ScienceAugust

<tbody>
</tbody><colgroup><col></colgroup>
Science

<tbody>
</tbody><colgroup><col></colgroup>
August90%94.99%2
ScienceAugust

<tbody>
</tbody><colgroup><col></colgroup>
Science

<tbody>
</tbody><colgroup><col></colgroup>
August0%89.99%1

<tbody>
</tbody>
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
=LOOKUP(N4,{0,90,95,97.5},{1,2,3,4,5})
n4 is the column with the percentage
 
Upvote 0
Thanks, Simon4s. However, I am looking for a formula that is not with a fixed Numbers since the numbers of the RAW is a configuration that constantly change every month.

=LOOKUP(N4,{0,90,95,97.5},{1,2,3,4,5})
n4 is the column with the percentage
 
Upvote 0
Thanks, Simon4s. However, I am looking for a formula that is not with a fixed Numbers since the numbers of the RAW is a configuration that constantly change every month.

I dont understand what you mean.

What do you mean raw? What numbers are changing?
 
Upvote 0
Oh! Let me rephrase that. The Table above is the Configuration. So for instance, If I have 98.5% on Math for July, the result is 4. Or if I have a Percentage of 97% for Science at August, then the result is 4. Each Month, the Table Configuration may Change so that is the reason I want the Formula to be Dynamic. :)


I dont understand what you mean.

What do you mean raw? What numbers are changing?
 
Upvote 0
Oh! Let me rephrase that. The Table above is the Configuration. So for instance, If I have 98.5% on Math for July, the result is 4. Or if I have a Percentage of 97% for Science at August, then the result is 4. Each Month, the Table Configuration may Change so that is the reason I want the Formula to be Dynamic. :)

Sorry can't help you. From what you describe, it sounds like my formula will still work??
 
Upvote 0
Your formula will work if the range is not fixed but the Configuration always changes. That is why I am still looking for other solution. Thanks, Simon4s

Sorry can't help you. From what you describe, it sounds like my formula will still work??
 
Upvote 0
Is this what you are looking for:


Unknown
ABCDEF
1UIDDescriptionMonthFromToOverall Score
2MathJulyMathJuly99%99999%5
3MathJulyMathJuly97.50%98.99%4
4MathJulyMathJuly95%97.49%3
5MathJulyMathJuly90%94.99%2
6MathJulyMathJuly0%89.99%1
7ScienceAugustScienceAugust99%99999%5
8ScienceAugustScienceAugust97.50%98.99%4
9ScienceAugustScienceAugust95%97.49%3
10ScienceAugustScienceAugust90%94.99%2
11ScienceAugustScienceAugust0%89.99%1
12
13DescriptionMonthPercentageOverall Score
14MathJuly98.50%4
15
Sheet12
Cell Formulas
RangeFormula
D14{=LOOKUP(C14,CHOOSE({1,2},SMALL(IF(A14&B14=$A$2:$A$11,$D$2:$D$11), ROW(INDIRECT("1:"&COUNTIF($A$2:$A$11,A14&B14)))), ROW(INDIRECT("1:"&COUNTIF($A$2:$A$11,A14&B14)))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
Thanks for this, Nishant94. Tried the formula. It worked. But, if I change the Numbers from the Overall Score, the answer would then be incorrect. Any idea how to get this? :) Thank you so much for your help.


Is this what you are looking for:

Unknown
ABCDEF
1UIDDescriptionMonthFromToOverall Score
2MathJulyMathJuly99%99999%5
3MathJulyMathJuly97.50%98.99%4
4MathJulyMathJuly95%97.49%3
5MathJulyMathJuly90%94.99%2
6MathJulyMathJuly0%89.99%1
7ScienceAugustScienceAugust99%99999%5
8ScienceAugustScienceAugust97.50%98.99%4
9ScienceAugustScienceAugust95%97.49%3
10ScienceAugustScienceAugust90%94.99%2
11ScienceAugustScienceAugust0%89.99%1
12
13DescriptionMonthPercentageOverall Score
14MathJuly98.50%4
15

<colgroup><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet12

Array Formulas
CellFormula
D14{=LOOKUP(C14,CHOOSE({1,2},SMALL(IF(A14&B14=$A$2:$A$11,$D$2:$D$11),
ROW(INDIRECT("1:"&COUNTIF($A$2:$A$11,A14&B14)))
),
ROW(INDIRECT("1:"&COUNTIF($A$2:$A$11,A14&B14)))
)
)}

<thead>
</thead><tbody>
</tbody>
Enter the formula with "Ctrl+Shift+Enter". Only Pressing "Enter" will result in formula giving error or incorrect result. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0
Try this using the same setup as above,

Code:
=SUMPRODUCT((((C14>=(($A$2:$A$11=A14&B14)*$D$2:$D$11))+(C14<=(($A$2:$A$11=A14&B14)*$E$2:$E$11)))=2)*$F$2:$F$11)
 
Upvote 0

Forum statistics

Threads
1,214,551
Messages
6,120,156
Members
448,948
Latest member
spamiki

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