Hello
I have a LibreOffice Calc spreadsheet where I keep a daily record of Distance and Time where:-
Column A = Date
Column B = Distance (Miles)
Column C = Time (Minutes)
I then have additional columns including monthly and yearly totals.
In Column D (Monthly Miles) I have the formula =IF(DAY(A32)=1,0,D31)+B32 which reads:-
If the Day in Column A is 1 (the first of the month) then reset the monthly total to 0 (zero) otherwise read the previous day for this month (D31) and in either case add today’s mileage (B32).
The above works fine resetting the monthly total to zero on the first day of each month but I can’t work out how to create a similar formula in Column E to reset the year column to zero on 1st January each year. Something along the lines IF(Day)=1 & (Month)=1, then Zero, otherwise copy previous day and add today seems likely but I just can’t work out the syntax. If there is a better solution that would be welcome.
Mike