Calculating an amount in a range

aaronhayes1982

New Member
Joined
Dec 1, 2016
Messages
1
Hi All (newbie here!)

I need a formula that can determine the amount of a value that is between a set range, but only if it first exceeds a fixed threshold.

I.e.

If A (a variable amount) exceed B (the fixed threshold amount) then what amount of A is between X and Y

In other words, If 100 (a variable amount) is greater than 50 (the threshold amount) what amount of 100 is between 60 and 70? Answer = 10

If the variable amount was 66 then the answer should show 6.

If the Variable amount was >50 the answer should be 0 as is does not cross the threshold amount?

I have read a number of posts but don't see the answer to this particular problem.

Appreciate you help on this one!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
welcome to the board

will the threshold always be less than the lower limit? will it always be less than the upper limit? Could it exceed the upper limit?
 
Upvote 0
so to cover all circumstances you probably want
=(variable>=threshold)*max(min(variable,upper)-lower,0)

This hasn't been tested as my Excel is busy
 
Upvote 0

Forum statistics

Threads
1,214,946
Messages
6,122,401
Members
449,081
Latest member
JAMES KECULAH

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