Lookup value from different range

Abdulkhadar

Board Regular
Joined
Nov 10, 2013
Messages
165
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Hello Excel Experts,
I want to find the grade. first lookup the maximum no. from A column from first row, then lookup the column B value from the prescribed range.

Maximum1020304060100
RANGEGRADERANGEGRADERANGEGRADERANGEGRADERANGEGRADERANGEGRADE
0910A+1820A+2730A+3640A+5460A+90100A+
0708A1417A2126A2835A4253A7089A
0506B+1013B+1520B+2027B+3041B+5069B+
0304B069B0914B1219B1829B3049B
002C005C008C0011C0017C0029C

<tbody>
</tbody>

My goal is

ABC
1MaximumObt. MarksGrade
2109A+
3209B
4309B
56030B+
610070A

<tbody>
</tbody>

Thanks in advance
 

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.

Excel 2010
ABCDEFGHIJKLMNOPQRS
1Maximum1020304060100
2RANGEGRADERANGEGRADERANGEGRADERANGEGRADERANGEGRADERANGEGRADE
3910A+1820A+2730A+3640A+5460A+90100A+
478A1417A2126A2835A4253A7089A
556B+1013B+1520B+2027B+3041B+5069B+
634B69B914B1219B1829B3049B
702C05C08C011C017C029C
8
9
10
11MaximumObt. MarksGrade
12109A+
13209B
14309B
156030B+
1610070A
Sheet4
Cell Formulas
RangeFormula
C12=INDEX(CHOOSE(LOOKUP(A12,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B12,CHOOSE(LOOKUP(A12,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C13=INDEX(CHOOSE(LOOKUP(A13,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B13,CHOOSE(LOOKUP(A13,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C14=INDEX(CHOOSE(LOOKUP(A14,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B14,CHOOSE(LOOKUP(A14,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C15=INDEX(CHOOSE(LOOKUP(A15,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B15,CHOOSE(LOOKUP(A15,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C16=INDEX(CHOOSE(LOOKUP(A16,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B16,CHOOSE(LOOKUP(A16,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
 
Upvote 0
Another option,

In C12, formula copied down to C16 :

=INDEX(OFFSET(A$1,2,MATCH($A12,B$1:S$1,0)+2,5),MATCH(B12,OFFSET(A$1,2,MATCH($A12,B$1:S$1,0)+1,5),-1))

Regards
Bosco
 
Upvote 0
Excel 2010
CellFormula
C12=INDEX(CHOOSE(LOOKUP(A12,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B12,CHOOSE(LOOKUP(A12,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C13=INDEX(CHOOSE(LOOKUP(A13,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B13,CHOOSE(LOOKUP(A13,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C14=INDEX(CHOOSE(LOOKUP(A14,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B14,CHOOSE(LOOKUP(A14,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C15=INDEX(CHOOSE(LOOKUP(A15,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B15,CHOOSE(LOOKUP(A15,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))
C16=INDEX(CHOOSE(LOOKUP(A16,{10,20,30,40,60,100},{1,2,3,4,5,6}),$D$3:$D$7,$G$3:$G$7,$J$3:$J$7,$M$3:$M$7,$P$3:$P$7,$S$3:$S$7),MATCH(B16,CHOOSE(LOOKUP(A16,{10,20,30,40,60,100},{1,2,3,4,5,6}),$C$3:$C$7,$F$3:$F$7,$I$3:$I$7,$L$3:$L$7,$O$3:$O$7,$R$3:$R$7),-1))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Thanks for quick reply, it works perfect upto range 60 i.e N1, but for 100 range range every marks grade shows A+.
 
Upvote 0
Another option,

In C12, formula copied down to C16 :

=INDEX(OFFSET(A$1,2,MATCH($A12,B$1:S$1,0)+2,5),MATCH(B12,OFFSET(A$1,2,MATCH($A12,B$1:S$1,0)+1,5),-1))

Regards
Bosco

Nice, Thanks for quick reply, it works perfect upto range 60 i.e N1, but This formula also not work for 100 range range every marks grade shows A+.
 
Upvote 0
Both formulas work for me. Make sure your cell references are correct.
 
Upvote 0
Both formulas work for me. Make sure your cell references are correct.

K Thanks sir, I dont know why this formula not works only for 10 & 100 in MS office-10 in my PC. Now it works perfectly in MS Office-7.
Thanks once again.
 
Upvote 0

Forum statistics

Threads
1,215,452
Messages
6,124,916
Members
449,195
Latest member
Stevenciu

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