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.


<tbody>
[TD="class: xl65"]Maximum[/TD]
[TD="class: xl66, colspan: 3"]10[/TD]
[TD="class: xl66, width: 108, colspan: 3"]20[/TD]
[TD="class: xl66, width: 108, colspan: 3"]30[/TD]
[TD="class: xl66, width: 108, colspan: 3"]40[/TD]
[TD="class: xl66, width: 108, colspan: 3"]60[/TD]
[TD="class: xl66, width: 108, colspan: 3"]100[/TD]

[TD="class: xl65"][/TD]
[TD="class: xl66, colspan: 2"]RANGE[/TD]
[TD="class: xl70"]GRADE[/TD]
[TD="class: xl66, colspan: 2"]RANGE[/TD]
[TD="class: xl70"]GRADE[/TD]
[TD="class: xl66, colspan: 2"]RANGE[/TD]
[TD="class: xl70"]GRADE[/TD]
[TD="class: xl66, colspan: 2"]RANGE[/TD]
[TD="class: xl70"]GRADE[/TD]
[TD="class: xl66, colspan: 2"]RANGE[/TD]
[TD="class: xl70"]GRADE[/TD]
[TD="class: xl66, colspan: 2"]RANGE[/TD]
[TD="class: xl70"]GRADE[/TD]

[TD="class: xl65"][/TD]
[TD="class: xl68"]09[/TD]
[TD="class: xl66"]10[/TD]
[TD="class: xl66"]A+[/TD]
[TD="class: xl68"]18[/TD]
[TD="class: xl66"]20[/TD]
[TD="class: xl66"]A+[/TD]
[TD="class: xl68"]27[/TD]
[TD="class: xl66"]30[/TD]
[TD="class: xl66"]A+[/TD]
[TD="class: xl68"]36[/TD]
[TD="class: xl66"]40[/TD]
[TD="class: xl66"]A+[/TD]
[TD="class: xl68"]54[/TD]
[TD="class: xl66"]60[/TD]
[TD="class: xl66"]A+[/TD]
[TD="class: xl68"]90[/TD]
[TD="class: xl66"]100[/TD]
[TD="class: xl66"]A+[/TD]

[TD="class: xl67"][/TD]
[TD="class: xl68"]07[/TD]
[TD="class: xl69"]08[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl68"]14[/TD]
[TD="class: xl69"]17[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl68"]21[/TD]
[TD="class: xl66"]26[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl68"]28[/TD]
[TD="class: xl66"]35[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl68"]42[/TD]
[TD="class: xl66"]53[/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl68"]70[/TD]
[TD="class: xl66"]89[/TD]
[TD="class: xl66"]A[/TD]

[TD="class: xl65"][/TD]
[TD="class: xl68"]05[/TD]
[TD="class: xl69"]06[/TD]
[TD="class: xl66"]B+[/TD]
[TD="class: xl68"]10[/TD]
[TD="class: xl69"]13[/TD]
[TD="class: xl66"]B+[/TD]
[TD="class: xl68"]15[/TD]
[TD="class: xl66"]20[/TD]
[TD="class: xl66"]B+[/TD]
[TD="class: xl68"]20[/TD]
[TD="class: xl66"]27[/TD]
[TD="class: xl66"]B+[/TD]
[TD="class: xl68"]30[/TD]
[TD="class: xl66"]41[/TD]
[TD="class: xl66"]B+[/TD]
[TD="class: xl68"]50[/TD]
[TD="class: xl66"]69[/TD]
[TD="class: xl66"]B+[/TD]

[TD="class: xl65"][/TD]
[TD="class: xl68"]03[/TD]
[TD="class: xl69"]04[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl68"]06[/TD]
[TD="class: xl69"]9[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl68"]09[/TD]
[TD="class: xl66"]14[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl68"]12[/TD]
[TD="class: xl66"]19[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl68"]18[/TD]
[TD="class: xl66"]29[/TD]
[TD="class: xl66"]B[/TD]
[TD="class: xl68"]30[/TD]
[TD="class: xl66"]49[/TD]
[TD="class: xl66"]B[/TD]

[TD="class: xl65"][/TD]
[TD="class: xl69"]00[/TD]
[TD="class: xl69"]2[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl69"]00[/TD]
[TD="class: xl69"]5[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl69"]00[/TD]
[TD="class: xl66"]8[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl69"]00[/TD]
[TD="class: xl66"]11[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl69"]00[/TD]
[TD="class: xl66"]17[/TD]
[TD="class: xl66"]C[/TD]
[TD="class: xl69"]00[/TD]
[TD="class: xl66"]29[/TD]
[TD="class: xl66"]C[/TD]

</tbody>

My goal is


<tbody>
[TD="class: xl66"][/TD]
[TD="class: xl66"]A[/TD]
[TD="class: xl66, width: 82"]B[/TD]
[TD="class: xl66, width: 101"]C[/TD]

[TD="class: xl66"]1[/TD]
[TD="class: xl65"]Maximum[/TD]
[TD="class: xl65"]Obt. Marks[/TD]
[TD="class: xl65"]Grade[/TD]

[TD="class: xl66"]2[/TD]
[TD="class: xl65"]10[/TD]
[TD="class: xl65"]9[/TD]
[TD="class: xl65"]A+[/TD]

[TD="class: xl66"]3[/TD]
[TD="class: xl65"]20[/TD]
[TD="class: xl65"]9[/TD]
[TD="class: xl65"]B[/TD]

[TD="class: xl66"]4[/TD]
[TD="class: xl65"]30[/TD]
[TD="class: xl65"]9[/TD]
[TD="class: xl65"]B[/TD]

[TD="class: xl66"]5[/TD]
[TD="class: xl65"]60[/TD]
[TD="class: xl65"]30[/TD]
[TD="class: xl65"]B+[/TD]

[TD="class: xl66"]6[/TD]
[TD="class: xl65"]100[/TD]
[TD="class: xl65"]70[/TD]
[TD="class: xl65"]A[/TD]

</tbody>

Thanks in advance
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

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[TABLE="width: 85%"]
<tbody>[TR]
[TD][TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C12[/TH]
[TD="align: left"]=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))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C13[/TH]
[TD="align: left"]=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))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C14[/TH]
[TD="align: left"]=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))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C15[/TH]
[TD="align: left"]=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))[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C16[/TH]
[TD="align: left"]=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))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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