• Resolved mmartinp

    (@mmartinp)


    Hi,

    I have a table with 10 rows, but the table will update each week with new information and the table will increase its rows, probably next week will have 15 row.

    I understand that the formula to sum column is ={SUM(C2:C11)} but what is the formula to sum the entire column without specifying the row?

    Thanks in advance for your help!
    Martín.

    • This topic was modified 6 years, 7 months ago by mmartinp.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    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

    Thread Starter mmartinp

    (@mmartinp)

    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.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    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

    Thread Starter mmartinp

    (@mmartinp)

    Thank you very much!

    I will take a look.

    Have a good day.
    Martín.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    sure, no problem!

    Best wishes,
    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?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Column sum automatization’ is closed to new replies.