I have a financial tracking spreadsheet (.ODS) with column headers: DATE, AMOUNT, BALANCE (example attached below). I have a separate sheet within the same spreadsheet where I analyze the information. Included in that analysis is the remaining balance at the end of each month.
Goal: Pull and display the remaining balance at the end of each month
Problem:
- There are multiple transactions a day (only the date is listed, not time)
- Sometimes there is no transaction on the actual final day of the month.
Attempted methods:
- I have tried XLOOKUP with the following formula XLOOKUP(MONTH END DATE,DATE RANGE,BALANCE RANGE,-1,-2). I have tried the different options for match mode and search mode but cannot get a consistently good result. This generally fails when there is no transaction on the last day of the month
- I have tried a longer approach of finding the vertical indices of the date range → take the last/first index corresponding to the last transaction → take balance from that vertical index. I am running into trouble when I try to find the index in a table with a non-exact match (closest match).
Is there a cleaner approach to this?
My system:
Version: 25.2.7.2 (X86_64) / LibreOffice Community
Build ID: 5cbfd1ab6520636bb5f7b99185aa69bd7456825d
CPU threads: 12; OS: Windows 11 X86_64 (10.0 build 26200); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Windows 11 Pro
Financial_Tracking_Example.ods (78.8 KB)
