write and excel formula to sum values in the rows above the current one, and in a…
- User
write and excel formula to sum values in the rows above the current one, and in a different column "Time" in a table, but which will adapt for filtered rows
Assistant
Here's an Excel formula that will sum values from rows above while respecting filters:
=SUBTOTAL(109,INDIRECT("Time"&"1:"&ROW()-1))This formula:
- Uses SUBTOTAL with function code 109 (which performs a SUM while ignoring hidden/filtered rows)
- References the "Time" column from row 1 up to the current row minus 1
- Uses INDIRECT to create the dynamic range reference
If your Time column isn't column A, you'll need to adjust the reference. For example, if Time is in column C, you would use:
=SUBTOTAL(109,INDIRECT("C"&"1:"&"C"&ROW()-1))Would you like me to explain how this works in more detail?
- User
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.