Is an if formula the best way to look through a list of values?

Musa15

Board Regular
Joined
Mar 8, 2015
Messages
63
I would need to write a formula that looks at cell with total cost value of $17812.61 and then references this table and points to 6.5%, what is the best way to achieve this? I was thinking an if formula might be too long as it checks for each percentage scenario but would appreciate any sugegstions.

thank you,

Rate Range
Annual Collections Monthly Collections
11.00% 362,714.07 30,226.17
10.75% 354,470.57 29,539.21
10.50% 346,227.07 28,852.26
10.25% 337,983.57 28,165.30
10.00% 329,740.07 27,478.34
9.75% 321,496.57 26,791.38
9.50% 313,253.06 26,104.42
9.25% 305,009.56 25,417.46
9.00% 296,766.06 24,730.51
8.75% 288,522.56 24,043.55
8.50% 280,279.06 23,356.59
8.25% 272,035.56 22,669.63
8.00% 263,792.05 21,982.67
7.75% 255,548.55 21,295.71
7.50% 247,305.05 20,608.75
7.25% 239,061.55 19,921.80
7.00% 230,818.05 19,234.84
6.75% 222,574.55 18,547.88
6.50% 214,331.04 17,860.92
6.25% 206,087.54 17,173.96
6.00% 197,844.04 16,487.00
5.75% 189,600.54 15,800.04
5.50% 181,357.04 15,113.09
5.25% 173,113.54 14,426.13
5.00% 164,870.03 13,739.17
4.75% 156,626.53 13,052.21
4.50% 148,383.03 12,365.25
4.25% 140,139.53 11,678.29
4.00% 131,896.03 10,991.34
3.75% 123,652.53 10,304.38
3.50% 115,409.02 9,617.42
3.25% 107,165.52 8,930.46
3.00% 98,922.02 8,243.50
2.75% 90,678.52 7,556.54
2.50% 82,435.02 6,869.58
2.25% 74,191.52 6,182.63
2.00% 65,948.01 5,495.67

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

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
You can do something like this:

Excel 2010
ABCDEFG
1Rate RangeAnnual CollectionsMonthly CollectionsValue $ 17,812.61
211.00%999999Rate6.25%
311.00%362,714.0730,226.17
410.75%354,470.5729,539.21
510.50%346,227.0728,852.26
610.25%337,983.5728,165.30
710.00%329,740.0727,478.34
89.75%321,496.5726,791.38
99.50%313,253.0626,104.42
109.25%305,009.5625,417.46
119.00%296,766.0624,730.51
128.75%288,522.5624,043.55
138.50%280,279.0623,356.59
148.25%272,035.5622,669.63
158.00%263,792.0521,982.67
167.75%255,548.5521,295.71
177.50%247,305.0520,608.75
187.25%239,061.5519,921.80
197.00%230,818.0519,234.84
206.75%222,574.5518,547.88
216.50%214,331.0417,860.92
226.25%206,087.5417,173.96
236.00%197,844.0416,487.00
245.75%189,600.5415,800.04
255.50%181,357.0415,113.09
265.25%173,113.5414,426.13
275.00%164,870.0313,739.17
284.75%156,626.5313,052.21
294.50%148,383.0312,365.25
304.25%140,139.5311,678.29
314.00%131,896.0310,991.34
323.75%123,652.5310,304.38
333.50%115,409.029,617.42
343.25%107,165.528,930.46
353.00%98,922.028,243.50
362.75%90,678.527,556.54
372.50%82,435.026,869.58
382.25%74,191.526,182.63
392.00%65,948.015,495.67
40

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet3

Worksheet Formulas
CellFormula
G2=INDEX(A3:A40,MATCH(G1,D2:D39,-1))

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

<tbody>
</tbody>



I added an extra row on the top so that the MATCH works properly. But an INDEX/MATCH works better than a lot of IFs.

Let me know if this helps.
 
Upvote 0
Hi Eric,

This looks perfect, would you be able to explain what the -1 in the formula means/does?

Thank you!
 
Upvote 0
Sure! The -1 just tells the MATCH function that the list you're seaching (D2:D39) is sorted in descending order.

You might also note that the INDEX range is offset by 1, (A3:A40). This is so that it gets the next line in the list, otherwise you'd get the 6.5% in your example. Also, the way it's set up, the number in the D column represents the top of the range. In other words, 17,860.92 will get the 6.25% rate.

Hope this helps!
 
Upvote 0
In case you have a value greater than 30,226.17. I put a number greater than anything I thought you'd encounter. Without the 999999, and you had a value of 31,000, it would have caused an error. This way a number of 31,000 will default to the A3 value.

The Excel lookup functions are really nice, but you do have to make sure you obey the rules, especially at borders.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,431
Messages
6,119,462
Members
448,899
Latest member
maplemeadows

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