formula for within table range

alizok

Board Regular
Joined
Sep 12, 2002
Messages
88
Office Version
  1. 365
Hello everyone

I have a table, I need a formula that look thru this table and if the number does not fall within this table than do additional formula otherwise display results. for example I have table like this:

128 - 132 = 50%
144 - 148 = 75%
160 - 164 = 100%

In this case if the data equal to 144 the result should be 75% if the data is 146 = 75%, if the data is 129 = 50% but if the data is 165 then it should preform different calculation and the result should be equal to 105%. Basically firs the formula looks within the table if it's within table range it just display the results. If the data is outside of the table ranges then it should to interpolation formula.

EDIT:
just to be clear here if the data is at 149 the result should be 80%. I know how to do interpolation formula I just need a formula that will be able to identify if the data falls within the range that I have in the table if not then do different formula.
 
Last edited by a moderator:

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Something like this?

=IFERROR(LOOKUP(A1,{128,133,144,149,160,165},{50,"a",75,"a",100,"a"})/100,"other formula here")
 
Last edited:
Upvote 0
Wow... that's was easy. Thank you very much it worked like a charm.
 
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