Title: Decimal Places
Last modified: August 21, 2016

---

# Decimal Places

 *  Resolved [Michael](https://wordpress.org/support/users/taloscent/)
 * (@taloscent)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/decimal-places-1/)
 * Hello,
    Based on some previous guidance you gave me I am trying to do the following:
   cell1: [registrationfee] (This is a shortcode) cell2: 128.00 cell3: =[tuitionrate]*
   8.00 cell4: =${NUMBER_FORMAT( SUM(B2:B4), 2 )} cell5: =${NUMBER_FORMAT( SUM(B2:
   B4)-B4, 2 )}
 * Problem: cell 3 will not show two decimal places even though I have .00 in there.
   
   Problem: I would like cell 1-3 to also show $. If I use a $ in the shortcode 
   it breaks and if I try to use a $ in cell 2 and 3 it breaks.
 * Any ideas?
    Thanks
 * [http://wordpress.org/plugins/tablepress/](http://wordpress.org/plugins/tablepress/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/decimal-places-1/#post-4504223)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * The reason for the problem in table 3 is the same as in the previous thread. 
   You’ll have to wrap that in the `NUMBER_FORMAT` function.
 * Then, to add the `$` to cells 1 and 3 as well:
    The trick here is to create separate
   cells for the mathematical calculation and the display and formatting. To do 
   this, just add another column to the right of the current one and hide the original
   column (via the “Selected columns: Hide” button). Then, in the hidden column,
   add the formulas without any formatting, i.e. without the `$` and the `NUMBER_FORMAT`.
   In the second column (which will be used for display), you’ll then just have 
   to use formulas like
 *     ```
       =${NUMBER_FORMAT( A2, 2 )}
       ```
   
 * to reference the calculated value from the cell on its left and format it.
 * Regards,
    Tobias
 *  Thread Starter [Michael](https://wordpress.org/support/users/taloscent/)
 * (@taloscent)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/decimal-places-1/#post-4504262)
 * Ah yes! I missed that. Thanks for the clarification. Good solution.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/decimal-places-1/#post-4504263)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this will help!
 * Best wishes,
    Tobias

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

The topic ‘Decimal Places’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/decimal-places-1/#post-4504263)
 * Status: resolved