Forum Discussion
Revenue structure
File Structure Reference
- Column A contains Client Names (e.g., A, B, etc.).
- Row 2 (starting Column B onward) contains month-end dates from Jan 2026 through Dec 2027.
- Columns B through the last month column contain monthly revenue values.
- The final column is the Total column (annual total calculation).
1. Termination Logic
If a client terminates in a specific month:
- Revenue should appear normally up to the month prior to termination.
- In the termination month, revenue should become zero (or stop, based on effective date assumption).
- All future months (including months in the following year) must remain zero automatically.
- The annual Total column must update correctly based only on active months.
The model must not require manual zeroing of future months — this should flow automatically once the termination month is specified.
2. Fee Update Logic
If a client’s fee changes in a specific month:
- The revised fee should apply only from that month forward.
- All prior months must remain unchanged.
- The increase should not assume a uniform annual escalation.
- The updated fee must flow correctly into the next year without altering historical data.
For example:
If the fee increases in July 2026, then:
- Jan–Jun 2026 remain at old rate.
- Jul 2026 onward reflects the new rate.
- 2027 months continue with the revised rate unless changed again.
It will be great if the formula works on Google Sheet as well.
5 Replies
- Olufemi7Iron Contributor
HelloDharmendra_Bharwad,
You can solve both termination and fee update logic with one formula that works in Excel and Google Sheets.
Assumptions
Row 2 contains real month-end dates (Jan 2026 to Dec 2027)
Column A = Client Name
Columns B onward = Monthly revenue
AA = Start Date
AB = Termination Date (blank if active)
AC = Base Fee
AD = Fee Change Date
AE = New FeeFormula to enter in B3 and copy across and down:
=IF(OR(B$2<$AA3,AND($AB3<>"",B$2>=$AB3)),0,IF(AND($AD3<>"",B$2>=$AD3),$AE3,$AC3))
Logic explanation
Start control
If the month is before the Start Date, revenue is zero.Termination logic
If a Termination Date exists and the month is on or after that date, revenue becomes zero.
All future months automatically remain zero. No manual clearing required.Fee update logic
If the month is on or after the Fee Change Date, the New Fee applies.
Earlier months remain at the Base Fee.
The updated fee flows automatically into the next year unless changed again.Total column formula
=SUM(B3:Y3)
This structure automatically updates totals, requires no manual zeroing, and works in both Excel and Google Sheets.
- Dharmendra_BharwadBrass Contributor
Hi Olufemi7 , Thanks for your response. I tried the formula at my end but it's not working. Can you please stress test at your end? I have attached the screenshot for your easy reference.
- NikolinoDEPlatinum Contributor
The challenge is to make these formulas dynamic so that when a termination date or fee change is entered, all future months automatically update without manual intervention. Also, the solution should work in both Excel and Google Sheets.
I think using a combination of IF statements and date comparisons would work. For termination, the formula in each month's revenue cell would check if the termination date is before or equal to the month in the column header. If yes, return zero; else, use the previous month's revenue (or the original value if it's the first month).
I think the solution involves setting up a table with client names, termination dates, fee change dates, and then using formulas that reference these dates to determine the revenue for each month.
To implement the termination and fee update logics in Excel/Google Sheets with automatic future-month adjustments, you can follow this structured approach:
Formula for Monthly Revenue (e.g., Cell B3 for Client A, Jan 2026):
=IF(B$2 >= $C3, 0,
IF(ROW(B3)=ROW($B$3), $D3,
IF(B2=0, 0, B2)))
Annual Total (e.g., Cell N3):
=SUM(B3:M3)
Fee Update Logic Implementation
Setup Fee Schedule Table (e.g., Columns O:R):
Client
Fee Change Date
New Fee
Exact Match Flag
A
2026-07-01
1500
TRUE
Formula for Monthly Fee (e.g., Cell D3 for Client A):
=IFERROR(
XLOOKUP(B$2, $O:$O, $R:$R, $D$2, 0, 1),
$D$2)
Replace XLOOKUP if in Google Sheets is unavailable.
=IFERROR(VLOOKUP(B$2, $O:$R, 4, 1), $D$2)
Date Formatting: Ensure termination dates (Column C) and fee change dates (Column O) are stored as YYYY-MM-DD (e.g., 2026-07-01) for reliable comparisons.
Fee Schedule Sorting: If using VLOOKUP, sort the fee schedule table by date in ascending order. XLOOKUP doesn’t require sorting.
Total Column: Use =SUM(B3:M3)—it will dynamically exclude zeroed months post-termination.
I Think this approach is scalable, maintainable, and error-resistant. Test it with a small dataset first to confirm behavior, then scale to your full dataset. For Google Sheets, prioritize XLOOKUP or exact-match VLOOKUP to avoid lookup errors.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and like it!
This will help all forum participants.
- Dharmendra_BharwadBrass Contributor
Hi NikolinoDE , The formula is not working. Can you please check it at your end? Below is the screenshot of excel version.
- NikolinoDEPlatinum Contributor
Based on the screenshot you provided, I can see the exact column layout. The previous formula I gave might have been based on a different column assumption.
Here is the corrected, robust solution tailored specifically to the column layout in your screenshot (Columns B through F).
Place this formula in cell G3 (which corresponds to Jan 26 for Client A) and drag it right and down.
=IF(G$2 < $B3, 0, IF(G$2 >= $F3, 0, IF(G$2 >= $D3, $E3, $C3)))
*If your Excel uses semicolons instead of commas, use: =IF(G$2 < $B3; 0; IF(G$2 >= $F3; 0; IF(G$2 >= $D3; $E3; $C3)))).
If you says "It's not working," , please check these 3 things:
- Date Formats: Ensure Row 2 (Jan 26, Feb 26) are actual Dates and not just text. If they are text, the comparison G$2 >= $B3 will fail.
- Absolute References: Ensure they copied the formula exactly, especially the $ signs. If they drag the formula and the references shift (e.g., B3 becomes C3), the logic breaks.
- Termination Logic: The formula assumes that if the Termination Date is, for example, 14/11/2026, the revenue for November is 0. If they want revenue for the month of termination, change G$2 >= $F3 to G$2 > $F3. However, standard accounting usually cuts off revenue on the termination date, so >= is safer.
"I have adjusted the formula based on the screenshot you sent. The columns are slightly different than the generic description. Please use this specific formula in cell G3 (Jan 26 for Client A) and drag it across and down:=IF(G$2 < $B3, 0, IF(G$2 >= $F3, 0, IF(G$2 >= $D3, $E3, $C3)))
This handles the automatic zeroing of future months and the fee escalation without needing to change the formula for next year.
My answers are voluntary and without guarantee!
Hope this will help you.