• Resolved jdw21

    (@jdw21)


    I’ve added some formulas in my table and they function correctly but when appearing that show up as decimal (.1) but would like for it to show up as percentage (10%).

    How can I do this? I figured there was a CSS that would allow this but haven’t found anything yet. Thanks!

    https://www.ads-software.com/plugins/tablepress/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter jdw21

    (@jdw21)

    Anyone have thoughts about this? I’m trying to finish this project today.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    CSS will not help here, as that can only change the styling, but not the content.
    You will basically have to adjust your formulas a little bit here, via a special syntax that is explained at https://tablepress.org/tablepress-features-formulas/

    Just extend your formulas to

    ={CURRENT_FORMULA * 100} %

    (where CURRENT_FORMULA is your current formula).

    This will basically multiply by 100 and append the % as a character symbol.

    Regards,
    Tobias

    Thread Starter jdw21

    (@jdw21)

    Thanks Tobias!

    That helped and did the trick. I was wondering if you also knew the formula if I wanted to add in that I want the % to only be a decimal place? For instance, 20.5%, not 20.5434346%.

    I have found a way to do this but it is a little more work. I have one formula just simple as:
    =C2/B2. Then another formula in another box as: ={round(F2*100,1)}%. Basically I have it taking the result from one column and then multiplying by 100 then adding %. I then have the column hidden with original formula.

    Do you know of a way to add the round into the formula to make it easier? If not, I still got a way for it to do what I need. Thanks!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    good to hear that this helped!

    Yes, you will need the round() function here. The best place for it is where you have it now, I think. You could move it to the other cell, I guess, but would then maybe have to round for three decimal places.

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter jdw21

    (@jdw21)

    Thanks! I think I will leave it. Easy that way. Thanks again for your help. Plugin is awesome.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Always happy to help!

    Best wishes,
    Tobias

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to format decimals to show up as percentage?’ is closed to new replies.