Hi,
thanks for your post, and sorry for the trouble.
I see what you mean, but unfortunately, I’ll have to disappoint you here. The formulas only understand actual cell references, i.e. hard-coded row numbers. Sorry.
Regards,
Tobias
Hi Tobias, thanks for your response.
Your plugin is awesome, I just only stuck here…
If you could give me an advice…I am checking the information that you recommended in other post “https://www.datatables.net/examples/” Is there any kind of solution here to help me?
Thanks.
Martín.
Hi,
I’m not sure to be honest. The DataTables JS library has nothing to do with the TablePress formulas. It could however search as a tool to use JavaScript to make the desired calculations. You would basically have to use the DataTables API to retrieve the raw column data, and then use JS code to sum it up and print it to the footer cell.
Regards,
Tobias
In my table, each row contains a location visited. These locations repeat from time to time. Column H includes the number of nights spent at the location
In cell H98, I have the formula: =Total Nights: {SUM(H2:H97)}
This formula correctly sums up the number of nights located in cell H# for all locations. It currently displays: Total Nights: 160
Problem: I want to know the total nights spent at any one location. Therefore, I search to only display rows containing the particular location, but it still displays 160 in the footer. How can I get this to display the sum of only the rows currently displayed.
Any suggestions on how to fix this?
Hi,
I see what you mean, but unfortunately, I don’t really know a solution 🙁 As all formulas are evaluated before hidden rows are removed, there’s no way to directly achieve what you’d need here, unfortunately. Your best chance might be to use custom JavaScript code to perform the calculation in the browser.
Regards,
Tobias