Lookup nth column value for specified 'n'

Ian McPherson

New Member
Joined
Feb 20, 2018
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Attached example shows a table of % values. For a specified n=C4 value, lookup up the corresponding %'s from 1-n (yellow highlight).
Thanking you in advance.

Example.xlsx
BCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
4Select21%12345678910111213141516171819202122
5114.0%1100.0%65.0%50.0%34.0%31.0%25.0%23.0%21.0%20.5%20.0%19.0%18.0%18.0%17.0%17.0%16.0%16.0%15.0%15.0%14.0%14.0%13.0%
6210.0%235.0%30.0%28.0%24.0%20.0%19.0%18.0%17.0%17.0%16.0%15.0%15.0%14.0%13.0%12.0%12.0%11.0%11.0%10.0%10.0%9.0%
738.0%320.0%22.0%18.0%17.5%16.5%15.0%14.5%14.0%13.0%13.0%12.0%12.0%10.0%9.0%9.0%9.0%8.5%8.5%8.0%7.8%
846.6%416.0%15.0%15.0%14.0%13.0%12.0%12.0%11.0%11.0%10.0%9.0%8.0%7.5%7.0%7.0%7.0%6.7%6.6%6.5%
956.0%512.0%12.5%11.5%11.0%10.0%10.0%9.5%9.5%8.0%8.0%7.0%7.0%6.5%6.5%6.3%6.2%6.0%6.0%
1065.5%610.0%9.0%9.0%8.0%8.0%8.0%8.0%7.0%7.0%6.4%6.5%6.0%6.0%5.8%5.7%5.5%5.5%
1175.0%77.0%7.0%7.0%5.5%6.5%6.5%6.0%5.8%5.9%6.0%5.5%5.5%5.3%5.2%5.0%5.0%
1284.6%86.0%6.0%5.0%5.5%5.0%5.0%4.9%5.4%5.5%5.0%5.0%4.9%4.7%4.6%4.6%
1394.2%95.0%4.5%4.5%4.0%4.6%4.5%5.0%5.0%4.7%4.6%4.5%4.4%4.2%4.2%
14103.9%104.0%3.8%3.6%4.2%4.2%4.6%4.6%4.4%4.3%4.1%4.1%3.9%3.9%
15113.6%113.2%3.3%3.8%3.9%4.2%4.3%4.2%4.0%3.8%3.8%3.6%3.6%
16123.4%123.1%3.4%3.5%3.8%3.9%3.9%3.7%3.5%3.6%3.4%3.4%
17133.2%133.0%3.2%3.5%3.6%3.6%3.4%3.2%3.4%3.2%3.2%
18143.1%143.0%3.2%3.3%3.3%3.2%3.1%3.2%3.1%3.1%
19153.0%153.0%3.0%3.1%3.1%3.0%3.0%3.0%3.0%
20162.9%162.8%3.0%3.0%2.9%2.9%2.9%2.9%
21172.8%172.8%2.9%2.8%2.8%2.8%2.8%
22182.7%182.8%2.7%2.7%2.7%2.7%
23192.6%192.6%2.6%2.6%2.6%
24202.5%202.5%2.5%2.5%
25212.4%212.4%2.4%
26222.3%
Sheet1
Cell Formulas
RangeFormula
C5:C25C5=FILTER(G5:G26,(G5:G26<=C4))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
C4List=$H$4:$AC$4
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Book2
BCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
4Select21%12345678910111213141516171819202122
5114%110.650.50.340.310.250.230.210.2050.20.190.180.180.170.170.160.160.150.150.140.140.13
6210%20.350.30.280.240.20.190.180.170.170.160.150.150.140.130.120.120.110.110.10.10.09
738%30.20.220.180.1750.1650.150.1450.140.130.130.120.120.10.090.090.090.0850.0850.080.078
847%40.160.150.150.140.130.120.120.110.110.10.090.080.0750.070.070.070.0670.0660.065
956%50.120.1250.1150.110.10.10.0950.0950.080.080.070.070.0650.0650.0630.0620.060.06
1066%60.10.090.090.080.080.080.080.070.070.0640.0650.060.060.0580.0570.0550.055
1175%70.070.070.070.0550.0650.0650.060.0580.0590.060.0550.0550.0530.0520.050.05
1285%80.060.060.050.0550.050.050.0490.0540.0550.050.050.0490.0470.0460.046
1394%90.050.0450.0450.040.0460.0450.050.050.0470.0460.0450.0440.0420.042
14104%100.040.0380.0360.0420.0420.0460.0460.0440.0430.0410.0410.0390.039
15114%110.0320.0330.0380.0390.0420.0430.0420.040.0380.0380.0360.036
16123%120.0310.0340.0350.0380.0390.0390.0370.0350.0360.0340.034
17133%130.030.0320.0350.0360.0360.0340.0320.0340.0320.032
18143%140.030.0320.0330.0330.0320.0310.0320.0310.031
19153%150.030.030.0310.0310.030.030.030.03
20163%160.0280.030.030.0290.0290.0290.029
21173%170.0280.0290.0280.0280.0280.028
22183%180.0280.0270.0270.0270.027
23193%190.0260.0260.0260.026
24203%200.0250.0250.025
25212%210.0240.024
26  220.023
Sheet4
Cell Formulas
RangeFormula
C5:C26C5=IF(G5<=$C$4,G5,"")
D5:D26D5=IF(C5="","",INDEX(H5:AC5,$C$4))
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Is this what you mean?

22 08 09.xlsm
BCDEFGHIJKLMNO
4Select5%12345678
531.0%1100.0%65.0%50.0%34.0%31.0%25.0%23.0%21.0%
624.0%235.0%30.0%28.0%24.0%20.0%19.0%18.0%
718.0%320.0%22.0%18.0%17.5%16.5%15.0%
815.0%416.0%15.0%15.0%14.0%13.0%
912.0%512.0%12.5%11.5%11.0%
10610.0%9.0%9.0%
1177.0%7.0%
1286.0%
139
Sheet2 (2)
Cell Formulas
RangeFormula
D5:D9D5=LET(col,FILTER(H5:AC26,H4:AC4=C4),FILTER(col,col<>""))
Dynamic array formulas.
 
Upvote 0
Where is the 'Mark as solution' button??
Top right of the relevant post
1660020590077.png
 
Upvote 0
Thks, can't see for looking!:)
:biggrin:

Given that you marked post #2 it appears that you wanted both the sequence of numbers in column C and the percentages in column C whereas I thought you might have only wanted the percentages.

If you are interested, you can get both with a single formula in a single cell without copying it down or across at all - assuming your headings are actually as shown in H4:AC4**.
If you want to try it, clear all the formulas from C5:D26 and just put this formula in C5.

22 08 09.xlsm
BCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
4Select5%12345678910111213141516171819202122
5131.0%1100.0%65.0%50.0%34.0%31.0%25.0%23.0%21.0%20.5%20.0%19.0%18.0%18.0%17.0%17.0%16.0%16.0%15.0%15.0%14.0%14.0%13.0%
6224.0%235.0%30.0%28.0%24.0%20.0%19.0%18.0%17.0%17.0%16.0%15.0%15.0%14.0%13.0%12.0%12.0%11.0%11.0%10.0%10.0%9.0%
7318.0%320.0%22.0%18.0%17.5%16.5%15.0%14.5%14.0%13.0%13.0%12.0%12.0%10.0%9.0%9.0%9.0%8.5%8.5%8.0%7.8%
8415.0%416.0%15.0%15.0%14.0%13.0%12.0%12.0%11.0%11.0%10.0%9.0%8.0%7.5%7.0%7.0%7.0%6.7%6.6%6.5%
9512.0%512.0%12.5%11.5%11.0%10.0%10.0%9.5%9.5%8.0%8.0%7.0%7.0%6.5%6.5%6.3%6.2%6.0%6.0%
10610.0%9.0%9.0%8.0%8.0%8.0%8.0%7.0%7.0%6.4%6.5%6.0%6.0%5.8%5.7%5.5%5.5%
1177.0%7.0%7.0%5.5%6.5%6.5%6.0%5.8%5.9%6.0%5.5%5.5%5.3%5.2%5.0%5.0%
1286.0%6.0%5.0%5.5%5.0%5.0%4.9%5.4%5.5%5.0%5.0%4.9%4.7%4.6%4.6%
1395.0%4.5%4.5%4.0%4.6%4.5%5.0%5.0%4.7%4.6%4.5%4.4%4.2%4.2%
14104.0%3.8%3.6%4.2%4.2%4.6%4.6%4.4%4.3%4.1%4.1%3.9%3.9%
15113.2%3.3%3.8%3.9%4.2%4.3%4.2%4.0%3.8%3.8%3.6%3.6%
16123.1%3.4%3.5%3.8%3.9%3.9%3.7%3.5%3.6%3.4%3.4%
17133.0%3.2%3.5%3.6%3.6%3.4%3.2%3.4%3.2%3.2%
18143.0%3.2%3.3%3.3%3.2%3.1%3.2%3.1%3.1%
19153.0%3.0%3.1%3.1%3.0%3.0%3.0%3.0%
20162.8%3.0%3.0%2.9%2.9%2.9%2.9%
21172.8%2.9%2.8%2.8%2.8%2.8%
22182.8%2.7%2.7%2.7%2.7%
23192.6%2.6%2.6%2.6%
24202.5%2.5%2.5%
25212.4%2.4%
26222.3%
Extract Col (2)
Cell Formulas
RangeFormula
C5:D9C5=LET(s,SEQUENCE(C4),CHOOSE({1,2},s,INDEX(H5:AC26,s,C4)))
Dynamic array formulas.


** If the H4:AC4 headings are in fact different, a slight modification would be needed but still just the single formula can do it.
 
Upvote 0

Forum statistics

Threads
1,215,030
Messages
6,122,762
Members
449,095
Latest member
m_smith_solihull

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