Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Per,

    thanks for your post, and sorry for the trouble.

    Yes, this is kind of expected. Basically, the formulas will always be evaluated so that numbers are as short as possible.
    Right now, there’s nothing that can be done against this, but I do have plans to add more functions to the formula parser that will allow to format a number (e.g. so that it always has to decimal places).
    This will however not be available before the next TablePress release…

    Regards,
    Tobias

    Thread Starter psn

    (@psn)

    Hi Tobias,

    Have you looked into the missing ROUND function yet? It would be great if you can add in this math function so all SUMs comes with decimals.

    Per

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, I did. I just forget to post in this thread again, sorry ??

    The function that you are looking for is “number_format”, and you can find details about it in this post: https://tablepress.org/tablepress-features-formulas/
    You’ll want to use it like

    =NUMBER_FORMAT(SUM(B2:B5),2)

    Regards,
    Tobias

    Thread Starter psn

    (@psn)

    Ok,

    Have some issue with this:

    1. When SUM already contains decimals from the other cells I get error
    2. When I have -30000.00 in cells that should in SUM get decimails I get error

    In both cases I can see correct result in SUM cell but error in bottom of table: !ERROR! I11 does not contain a number or expression

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    can you please post a link to the page with the table, so that I can take a direct look?

    Also, what exactly are you getting as the result of the SUM function?

    Regards,
    Tobias

    Thread Starter psn

    (@psn)

    Hi,

    I use now =NUMBER_FORMAT(SUM(B2:H2),2) to summerize rows which gives me -30,000.00 in column I2

    When I then summerize last columns I with =NUMBER_FORMAT(SUM(I2:I22),2) I get the above issue when the result already contains decimals or when negative amounts occur or its complaining over the comma for thousend that formula gives.

    Page is in a restricted area so I need to have your mailadress and I will send you login credentials and instruction how to navigate to this page.

    So which mailadress can I send my details?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    ah, ok. So you are SUMming over values that have been NUMBER_FORMATted. I see.
    The minus should not be an issue, but the comma is.
    The trick that you could use here, is to create an extra column where you SUM but don’t NUMBER_FORMAT yet. Then, hide that column, but use the cells as the NUMBER_FORMAT arguments.
    Does that make sense?

    If it doesn’t: You can find my email address in the main plugin file “tablepress.php”.

    Regards,
    Tobias

    Thread Starter psn

    (@psn)

    OK will mail you as I dont really understand what you mean and how I can hide a column.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    just as an update for everybody: I’ve worked directly with psn and we fixed the issues by implementing that described workaround ??

    Regards,
    Tobias

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Decimals not showing’ is closed to new replies.