Two way lookup with smallest reference value

sanrama

New Member
Joined
May 2, 2015
Messages
20
Office Version
  1. 2013
Platform
  1. Windows
My current table form is
AB C
1Week NoAreaCompliance
2Week 1Item 150.00%
3Week 1Item 260.00%
4Week 1Item 370.00%
5Week 2Item 180.00%
6Week 2Item 255.00%
7Week 2Item 366.00%
8Week 2Item 556.00%
9Week 3Item 153.00%
10Week 3Item 288.00%
11Week 3Item 395.00%
12Week 3Item 499.00%
13Week 3Item 5100.00%
14Week 4Item 10.00%
15Week 4Item 235.00%
16Week 4Item 599.00%
17Week 4Item 6100.00%
<colgroup><col width="69" style="width: 52pt; mso-width-source: userset; mso-width-alt: 2523;"> <col width="50" style="width: 38pt; mso-width-source: userset; mso-width-alt: 1828;"> <col width="150" style="width: 113pt; mso-width-source: userset; mso-width-alt: 5485;"> <tbody> </tbody>

I requred following value

reference value ( from Column B ) from smallest value (column C) in week 4

Lookup value 1 : week 4 ( column A )
Lookup value 2 : smallest in week 4 from column C
Answer : Item 1
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
try this one
=OFFSET(INDIRECT(CELL("address",INDEX(C2:C17,MATCH(MIN(C2:C17),C2:C17,0)))),0,-1)
returns "Item1"
 
Upvote 0
Thanks EFANYoutube,

but it's not working

This file contain large no data.
Lookup value 1 is variable week 1, week 2, week 3 .......
Lookup value 2 is 1st smallest value for week 1, 2nd smallest value for week 1, 3rd ...........
 
Upvote 0
Row\Col
A​
B​
C​
D​
E​
F​
1​
Week NoAreaComplianceweek 4week 3
2​
Week 1Item 1
50.00%
Item 1Item 1
3​
Week 1Item 2
60.00%
Item 9
4​
Week 1Item 3
70.00%
5​
Week 2Item 1
80.00%
6​
Week 2Item 2
55.00%
7​
Week 2Item 3
66.00%
8​
Week 2Item 5
56.00%
9​
Week 3Item 1
53.00%
10​
Week 3Item 2
88.00%
11​
Week 3Item 3
95.00%
12​
Week 3Item 4
99.00%
13​
Week 3Item 5
100.00%
14​
Week 3Item 9
53.00%
15​
Week 4Item 1
0.00%
16​
Week 4Item 2
35.00%
17​
Week 4Item 5
99.00%
18​
Week 4Item 6
100.00%

In E2 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($B$2:$B$18,SMALL(IF($A$2:$A$18=E$1,IF($C$2:$C$18=MIN(IF($A$2:$A$18=E$1,$C$2:$C$18)),ROW($B$2:$B$18)-ROW($B$2)+1)),ROWS(E$2:E2))),"")
 
Upvote 0
Thank you aladin akyurek,

but it is woking only for 1st smallest value or smallest duplicate value, not for 2nd/3rd smallest value for the same week

My requirement is

Row\ColABCDEF
1Week NoAreaCompliance week 4week 2
2Week 1Item 150.00% Item 1Item 2
3Week 1Item 260.00% Item 2Item 5
4Week 1Item 370.00% Item 5Item 3
5Week 2Item 180.00% Item 6Item 1
6Week 2Item 255.00%
7Week 2Item 366.00%
8Week 2Item 556.00%
9Week 3Item 153.00%
10Week 3Item 288.00%
11Week 3Item 395.00%
12Week 3Item 499.00%
13Week 3Item 5100.00%
14Week 3Item 953.00%
15Week 4Item 10.00%
16Week 4Item 235.00%
17Week 4Item 599.00%
18Week 4Item 6100.00%

<tbody>
</tbody><colgroup><col span="7"></colgroup>


set of data contain 75 weeks and each week is having 10-15 item
Week no is changing as per requirement in E1/F/ cell
By changing only week no I suppose to get particular week data in ascending or descending.


Thank you in advance
 
Upvote 0
That's a different question...

Row\Col
A​
B​
C​
D​
E​
1​
Week NoAreaComplianceweek 4week 3
2​
Week 1Item 1
50.00%
Item 1Item 1
3​
Week 1Item 2
60.00%
Item 2Item 9
4​
Week 1Item 3
70.00%
Item 5Item 2
5​
Week 2Item 1
80.00%
Item 6Item 3
6​
Week 2Item 2
55.00%
Item 4
7​
Week 2Item 3
66.00%
8​
Week 2Item 5
56.00%
9​
Week 3Item 1
53.00%
10​
Week 3Item 2
88.00%
11​
Week 3Item 3
95.00%
12​
Week 3Item 4
99.00%
13​
Week 3Item 5
100.00%
14​
Week 3Item 9
53.00%
15​
Week 4Item 1
0.00%
16​
Week 4Item 2
35.00%
17​
Week 4Item 5
99.00%
18​
Week 4Item 6
100.00%

In D2 control+shift+enter, not just enter, copy across, and down:

=IFERROR(INDEX($B$2:$B$18,SMALL(IF($A$2:$A$18=D$1,IF($C$2:$C$18=SMALL(IF($A$2:$A$18=D$1,$C$2:$C$18),ROWS($D$2:D2)),ROW($C$2:$C$18)-ROW($C$2)+1)),SUM(IF(SMALL(IF($A$2:$A$18=D$1,$C$2:$C$18),ROW($C$2:C2)-ROW($C$2)+1)=SMALL(IF($A$2:$A$18=D$1,$C$2:$C$18),ROWS(D$2:D2)),1)))),"")
 
Upvote 0
Exactly what I am looking for


Thank you Aladin Akyurek
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,927
Members
449,094
Latest member
teemeren

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