BiblioManiac
New Member
- Joined
- Jan 14, 2022
- Messages
- 1
- Office Version
- 2016
- Platform
- Windows
I have inherited a spreadsheet that is used to calculate balances for in incentive program for nurses in my organization.
Nurses submit hours and earn $1.25 per hour. If they spend the amount they accumulated, that is recorded in the spreadsheet and that amount is substracted from their balances.
The organization recently enacted a two year expiration for these hours that is based on the month. So hours recorded in March 2020 would expire April 1, 2022. Hours recorded April 2020 would expire May 1, 2022 and so on.
The hours are also not supposed to expire if the nurse has spent part of the balance.
I almost have a working formula for this, but I cannot get the date aspect to work properly.
It is still subtracting from the balance even if the hours were entered in a month still within the 2 year timeframe.
Any assistance is greatly appreciated!
Nurses submit hours and earn $1.25 per hour. If they spend the amount they accumulated, that is recorded in the spreadsheet and that amount is substracted from their balances.
The organization recently enacted a two year expiration for these hours that is based on the month. So hours recorded in March 2020 would expire April 1, 2022. Hours recorded April 2020 would expire May 1, 2022 and so on.
The hours are also not supposed to expire if the nurse has spent part of the balance.
I almost have a working formula for this, but I cannot get the date aspect to work properly.
It is still subtracting from the balance even if the hours were entered in a month still within the 2 year timeframe.
Any assistance is greatly appreciated!
Example Spreadsheet1-5.xlsx | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | |||
1 | ID | Forwarded | Jan-20 | Feb-20 | Mar-20 | Apr-20 | May-20 | Jun-20 | Jul-20 | Aug-20 | Sep-20 | Oct-20 | Nov-20 | Dec-20 | Jan-21 | Feb-21 | Mar-21 | Apr-21 | May-21 | Jun-21 | Jul-21 | Aug-21 | Sep-21 | Oct-21 | Nov-21 | Dec-21 | Totals | |||
2 | 10419309 | PIP Hrs | 84.0 | 84.0 | 36.0 | 36.0 | 51.0 | 12.0 | 12.0 | 48.0 | 24.0 | 48.0 | 36.0 | 471.00 | ||||||||||||||||
3 | $ Spent | $198.27 | $168.09 | $366.36 | ||||||||||||||||||||||||||
4 | $ Earned | $0.00 | $0.00 | $0.00 | $105.00 | $210.00 | $255.00 | $255.00 | $255.00 | $255.00 | $255.00 | $255.00 | $255.00 | $255.00 | $255.00 | $300.00 | $165.48 | $168.09 | $168.09 | $168.09 | $168.09 | $168.09 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | |||
5 | Expired | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | $12.39 | $0.00 | $15.00 | $0.00 | $60.00 | $30.00 | $60.00 | $45.00 | $0.00 | 24 | ||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
AB2:AB3 | AB2 | =SUM(D2:AA2) |
R4:AA4,D4:P4 | D4 | =MAX(C4+(D2*1.25)-D3-D5, 0) |
Q4 | Q4 | =MAX(P4+(Q2*1.25)-Q3-Q6, 0) |
AB4 | AB4 | =+AA4 |
D5 | D5 | =MAX(0,SUMIFS($D$2:D$2,$D$1:D$1,"<"&EDATE(D$1,AB5))*1.25-SUM($AB$3)-SUM($C$5:C$5)) |
E5 | E5 | =MAX(0,SUMIFS($D$2:E$2,$D$1:E$1,"<"&EDATE(E$1,AB5))*1.25-SUM($AB$3)-SUM($C$5:D$5)) |
F5 | F5 | =MAX(0,SUMIFS($D$2:F$2,$D$1:F$1,"<"&EDATE(F$1,AB5))*1.25-SUM($AB$3)-SUM($C$5:E$5)) |
G5 | G5 | =MAX(0,SUMIFS($D$2:G$2,$D$1:G$1,"<"&EDATE(G$1,AB5))*1.25-SUM($AB$3)-SUM($C$5:F$5)) |
H5 | H5 | =MAX(0,SUMIFS($D$2:H$2,$D$1:H$1,"<"&EDATE(H$1,AB5))*1.25-SUM($AB$3)-SUM($C$5:G$5)) |
I5 | I5 | =MAX(0,SUMIFS($D$2:I$2,$D$1:I$1,"<"&EDATE(I$1,AB5))*1.25-S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