date/ number of days in range formula help

Flora2021

Board Regular
Joined
Apr 28, 2022
Messages
52
Office Version
  1. 365
Platform
  1. Windows
Hi, I have a spreasheet template where I enter a number of billing days. I then have to calculate number of days in each date range based on that number.
For example, If the total number of billing days is 123 days, I have to add how many days it was in the 71-90 range, then the 91-120 range and so on. We only start charging from days 71-90.
I have to use this because we have to charge different amounts based on the accumulating date ranges. We would only charge say 60 per day for range 91-120 and not from days 71-90. I can figure out the calculation of dollars but I am not sure how to get the count of days per each range. Thanks for you help in advance.
 

Attachments

  • screenshot 3.JPG
    screenshot 3.JPG
    25.3 KB · Views: 10

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
T202304a.xlsm
ABCDEF
11-7071-9091-120121-x
21237020303
3
1d
Cell Formulas
RangeFormula
C2C2=(B2>0)*MIN(B2,70)
D2D2=(B2>70)*MIN(B2-70,20)
E2E2=(B2>90)*MIN(B2-90,30)
F2F2=(B2>120)*(B2-120)
 
Upvote 0
You could complete the charge calculation with one formula.
I included an example with a table and another that names the bracket and rate differential information.
Edit the information for your actual rates.

T202304a.xlsm
ABCD
1NumberChargeCharge
21233,010.003,010.00
3500.000.00
42008,400.008,400.00
5
1d
Cell Formulas
RangeFormula
C2:C4C2=SUM((B2>$B$16:$B$19)*(B2-$B$16:$B$19)*($C$16:$C$19-$C$15:$C$18))
D2:D4D2=SUM((B2>aB)*(B2-aB)*aR)


The formula in D2 uses named information; use Name Manager .
name the brackets information aB specify value ={0;70;90;120}
name the relevant Rate Differential aR ={0;50;10;10}

T202304a.xlsm
ABCDEFG
6
7
8Number1-7071-9091-120>=121
91237020303
10506070
1110001800210
12
13
14BracketsRates
15
1600
177050
189060
1912070
1d
Cell Formulas
RangeFormula
C9C9=(B9>0)*MIN(B9,70)
D9D9=(B9>70)*MIN(B9-70,20)
E9E9=(B9>90)*MIN(B9-90,30)
F9F9=(B9>120)*(B9-120)
D11:F11D11=D9*D10
 
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,270
Members
452,628
Latest member
dd2

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