• Resolved archon810

    (@archon810)


    Hi,

    I’d like to use an IF conditional, but output strings in return instead of numbers. For example, IF(A1-B1<0,”bla”,”foo”).

    However, using quotes (single or double) results in an error, and using no quotes results in !ERROR! undefined variable ‘bla’.

    So, is there any way to do this?

    Thanks! Love what you’re doing with the plugin.

    https://wordpress.org/plugins/tablepress/

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi again,

    It looks like you are making extensive use of formulas in your tables 🙂 Nice!

    Unfortunately, I’ll have to disappoint you here again. The EvalMath PHP library that TablePress uses for formulas can not handle strings at the moment (i.e. it tries to treat everything as a number or formula).
    Your best bet here is again to try this in Excel, I’m afraid.

    Sorry for not having better news.

    Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Using strings in conditionals? Variables?’ is closed to new replies.