Title: AUTOSUM
Last modified: April 25, 2017

---

# AUTOSUM

 *  Resolved [racingvalue](https://wordpress.org/support/users/racingvalue/)
 * (@racingvalue)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/autosum/)
 * Hi,
 * Great plugin!
 * I am trying to use the AUTOSUM using something like =SUM(A2:A8) and have managed
   to get it to work but the end result is not adding the decimal as you can see
   in the pics, how would i go about getting the result from lets say 4 to 4.00?
 * 
    -  This topic was modified 9 years, 3 months ago by [racingvalue](https://wordpress.org/support/users/racingvalue/).
    -  This topic was modified 9 years, 3 months ago by [racingvalue](https://wordpress.org/support/users/racingvalue/).

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/autosum/#post-9068969)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * For this, just wrap your `SUM` equation in a `NUMBER_FORMAT` call:
    `=NUMBER_FORMAT(
   SUM( G2:G4 ), 2 )`
 * Regards,
    Tobias
 *  Thread Starter [racingvalue](https://wordpress.org/support/users/racingvalue/)
 * (@racingvalue)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/autosum/#post-9069480)
 * Perfect!
 * Just one more thing is there any way to autosum say column G automatically when
   a new row is added from G2 onwards instead of editing the “=NUMBER_FORMAT( SUM(
   G2:G4 ), 2 )” each time?
 * Thanks 🙂
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/autosum/#post-9069593)
 * Hi,
 * if you use the “Insert row” button (when a row in the range of G2 to G4 is checked,
   by marking its checkbox on the left), the range should automatically expand.
 * Regards,
    Tobias
 *  Thread Starter [racingvalue](https://wordpress.org/support/users/racingvalue/)
 * (@racingvalue)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/autosum/#post-9069611)
 * Great thanks very much.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/autosum/#post-9069616)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/#new-post)
   here in the plugin directory. Thanks!
 *  Thread Starter [racingvalue](https://wordpress.org/support/users/racingvalue/)
 * (@racingvalue)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9467276)
 * Hi Tobias,
 * I am just wondering is it possible to SUM just the visible rows which have been
   filtered.
 * I get this error:
 * !ERROR! CIRCLE REFERENCE
 * Thanks
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9471605)
 * Hi,
 * not really, I’m afraid. As you can see, you get a circle reference, which means
   that the cell with the formula is part of the cells that are to be summed up.
 * Regards,
    Tobias
 *  [ericc44](https://wordpress.org/support/users/ericc44/)
 * (@ericc44)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9471723)
 * Hi,
    if you want to use SUM just the visible rows which have been filtered, it
   necessary to add a Table Footer You should add a new row to the end of the table
   and click the “Table Footer” row as well. and you can see [Sum of column](https://wordpress.org/support/topic/how-to-compute-a-sum-for-a-column-of-figures/#post-9427209)
 * Best regards
    Eric
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9471771)
 * Hi Eric,
 * yes, that would also be a nice solution.
 * Regards,
    Tobias
 *  Thread Starter [racingvalue](https://wordpress.org/support/users/racingvalue/)
 * (@racingvalue)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9474001)
 * Thanks for the reply guys.
 * Hi ericc44, I have added the footer and added this code but still see the !ERROR!
   Circle Reference, is this correct or did i miss something?
 * “footerCallback”: function( row, data, start, end, display ) { var api = this.
   api(), data; var intVal = function ( i ) { return typeof i === ‘string’ ? i.replace(/[\
   $,]/g, ”)*1 : typeof i === ‘number’ ? i : 0; }; total = api .column( 1, { page:‘
   current’} ) .data() .reduce( function (a, b) { return intVal(a) + intVal(b); },
   0 ); $( api.column(1 ).footer() ).html( total ); $( api.column( 2 ).footer() ).
   html(‘Totals :’); }
 * Thanks
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9474817)
 * Hi,
 * as this JavaScript “Custom Command” is a replacement for the formulas on the “
   Edit” screen, you must also remove those. This basically shifts the calculation
   from the server side to the browser.
 * Regards,
    Tobias
 *  [ericc44](https://wordpress.org/support/users/ericc44/)
 * (@ericc44)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9474851)
 * Hi,
    Thanks Tobias it is true.
 * Note : first column number is 0
    This code is correct and should sum all column
   1 (column number 2 of your table) and add text ‘Totals :’ in your column 2 (column
   number 3 of your table). Can you check you have only number in column 1 ?
 * Can you put a table link to check, please.
 * Best regards
    Eric
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9476247)
 * Hi,
 * yes, a link to check would be great, if you can’t solve this.
 * Regards,
    Tobias

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘AUTOSUM’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [sum](https://wordpress.org/support/topic-tag/sum/)

 * 13 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/autosum/#post-9476247)
 * Status: resolved