Title: Using strings in conditionals? Variables?
Last modified: August 24, 2016

---

# Using strings in conditionals? Variables?

 *  Resolved [archon810](https://wordpress.org/support/users/archon810/)
 * (@archon810)
 * [11 years ago](https://wordpress.org/support/topic/using-strings-in-conditionals-variables/)
 * 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/](https://wordpress.org/plugins/tablepress/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [11 years ago](https://wordpress.org/support/topic/using-strings-in-conditionals-variables/#post-6101868)
 * 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.

 * ![](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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/using-strings-in-conditionals-variables/#post-6101868)
 * Status: resolved