Support » Plugin: TablePress - Tables in WordPress made easy » Formulas in tables

Viewing 15 replies - 16 through 30 (of 45 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no, adding a $ sign is not possible, currently. You could either move the currency symbol to the table head row, or maybe create some JavaScript code, that adds the $ sign.

    Having just two digits after the decimal point can be achieved by using the round() function, that is mentioned above:

    =round(C2*0.925*0.90*E2,2)

    The 2 indicates that you want to digits there.

    Regards,
    Tobias

    vhmetals

    (@vhmetals)

    Thanks Tobias. I will try that.

    vhmetals

    (@vhmetals)

    That solved the issue. When it rounds, though, it leaves off the zero. It should read:

    1971.40

    Instead it reads,

    1971.4

    Also, is there a way to add a comma so that it reads,

    1,971.40

    Is there a shortcut to remove the phrase “ozt” from column C in bulk. I have 2800 entries so it would take a long time to manually remove that phrase.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ah, then try

    =round(C2*0.925*0.90*E2,3)

    It might be possible that the number indicates which digit shall be rounded.

    About the comma: No, sorry 🙁 Same reason as for the $ sign.

    And the “ozt”. There’s nothing the plugin to do this, but a quick way would be to export the table to CSV, open that in a text editor, do a search&replace there, and re-import the file, replacing the existing table.

    Regards,
    Tobias

    vhmetals

    (@vhmetals)

    Thanks I will work on that. Appreciate all the help!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem! You are very welcome!

    Best wishes,
    Tobias

    vhmetals

    (@vhmetals)

    Where can I leave a review?

    vhmetals

    (@vhmetals)

    One other question if you don’t mind. Is there a way to input the formula in a bulk fashion? For example,

    =round(C2*0.925*0.90*E2,0)
    =round(C3*0.925*0.90*E2,0)
    =round(C4*0.925*0.90*E2,0)
    =round(C5*0.925*0.90*E2,0)

    …All the way until C2800

    I ended up using 0 so that the value would round to the nearest dollar. Looks more professional.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    reviews are greatly appreciated, please see http://wordpress.org/support/view/plugin-reviews/tablepress

    For the bulk adding of formulas:
    Very good question… Where did you get your table from, initially? Excel? Can this maybe be automatized there, e.g. via a macro? I don’t really know another easy solution right now, but I’ll think about it. Maybe I can come up with something.

    Regards,
    Tobias

    vhmetals

    (@vhmetals)

    Thanks for the link. I will leave a review soon. My table data originated on TablePress. Should I be saving a hard copy or is my data secure on Table Press?

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks, that’s nice!

    So, you added the data for 2800 rows in TablePress? Wow, you must have spent a lot of time with that. Good job! 🙂

    Yes, your data is secure, but of course it is always the better idea to have a backup! In TablePress, you should export your table to CSV and JSON format. The CSV can be opened in Excel, for example, while the JSON format will store everything in a format that TablePress understands (in case you want to move the table to another server, for example). Additionally, it is always a good idea to have a full backup of the WordPress mySQL database.

    Regards,
    Tobias

    psn

    (@psn)

    Hi Tobias, is it possible for you to add in more functions, like TODAY(), INT? I want to calculate users age.

    Per

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi Per,

    no, I’m sorry. The evaluation of the formulas is done by an external third-party PHP library called EvalMath. Unfortunately, I don’t have the knowledge to extend that, as it uses some sophisticated parsing of math expressions, that I don’t have experience with. Sorry.

    Regards,
    Tobias

    Northwave

    (@northwave)

    Hi,
    is there a way to set the rounded decimals to always be 2, despite the formula outcome?

    Like =round(A1/B1,2), this works when there are more than two decimals in the result. It then rounds the value nicely to i.e. 1.97. But if the result is exactly 3, then it shows only 3 and not 3.00. Which would be nice.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    hmm, no, I don’t think that this is possible 🙁 This is the same problem as with the $ as a currency symbol and the , as a thousand separator, that I mentioned above. Changing the format of the numbers is not possible with the external library that is used. 🙁

    A workaround might be to add a very small number to the result of the calculation, and round that, like

    =round(A1/B1+0.00001,2)

    Regards,
    Tobias

Viewing 15 replies - 16 through 30 (of 45 total)
  • The topic ‘Formulas in tables’ is closed to new replies.