deLockloire
Board Regular
- Joined
- Apr 4, 2008
- Messages
- 116
- Office Version
- 365
- Platform
- Windows
I have a table with 3 columns: transaction date, costs/revenues, tax/deductable tax. Each row is one revenue or cost and the dates goes on multi-year seamlessly (i.e., I have a table that has this from 2019). What I'd like is to give a date in a cell (say A1), and have a formula that outputs a special sumif in b1 with the following rule:
1) it should sum all costs/revenues up to the date given in A1. (easy, simple sumif function, however...)
2) it should sum all tax/dedutcable tax as well up to the date indicated in A1, but the trick here is that this column should be evaluated separately for each year, and it cannot go below 0 in any given year. So if, say, in 2019 the sum of all revenues/costs is 10,000, the sum of all tax/deductables is 1000, and in 2020 the revenues are 100 and the taxes/deductables are -300, and the date is indicated in A1 is 2020.12.31, it should output 11,100 (10,000+1,000 for 2019 and 100+0 for 2020).
Is there a formula to solve this? Some form of subtotal or something?
Thanks for the tips!
1) it should sum all costs/revenues up to the date given in A1. (easy, simple sumif function, however...)
2) it should sum all tax/dedutcable tax as well up to the date indicated in A1, but the trick here is that this column should be evaluated separately for each year, and it cannot go below 0 in any given year. So if, say, in 2019 the sum of all revenues/costs is 10,000, the sum of all tax/deductables is 1000, and in 2020 the revenues are 100 and the taxes/deductables are -300, and the date is indicated in A1 is 2020.12.31, it should output 11,100 (10,000+1,000 for 2019 and 100+0 for 2020).
Is there a formula to solve this? Some form of subtotal or something?
Thanks for the tips!