Title: !ERROR! undefined variable &#8216;a1&#8217;
Last modified: December 17, 2017

---

# !ERROR! undefined variable ‘a1’

 *  Resolved [acrypto](https://wordpress.org/support/users/acrypto/)
 * (@acrypto)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-a1/)
 * I’m just trying to add up some numbers, as shown here:
    [https://tablepress.org/tablepress-features-formulas/](https://tablepress.org/tablepress-features-formulas/)
 * I have “1” in a1, b1 and c1.
    In d1 i have “=a1+b1+c1”
 * This gives me this error:
    !ERROR! undefined variable ‘a1’
 * Hope you can help,
 * Thank you
    -  This topic was modified 8 years, 5 months ago by [acrypto](https://wordpress.org/support/users/acrypto/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-a1/#post-9790688)
 * Hi,
 * thanks for your question, and sorry for the trouble.
 * Please try the uppercase version:
 *     ```
       =A1+B1+C1
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [acrypto](https://wordpress.org/support/users/acrypto/)
 * (@acrypto)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-a1/#post-9793850)
 * Thank you, that worked.
 * However I do have one more question.
 * I’m using a shortcoder plugin to execute any HTML or JS placed in it. Here is
   an example:
 *     ```
       <span class="btc_eur"></span>
       <script>
       (function($){
       	var cmc_ajax = $.getJSON('https://api.coinmarketcap.com/v1/ticker/bitcoin/?convert=EUR');
           cmc_ajax.done(function(data){
           	$('.btc_eur').text(data[0]['price_eur']);
           });
       })(jQuery);
       </script>
       ```
   
 * Placing this shortcode in the cell works well. However, when doing a formula (
   ex plus the value of the shortcode content with another cell) it gives me the“
   not contain a number or expression” error. I’m guessing it thinks the output 
   from the shortcode is a string? Any workaround of this?
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-a1/#post-9794120)
 * Hi,
 * indeed, that’s what the formula thinks. The reason simply is that this is a string(
   HTML plus JavaScript code). Strings can not be used in formulas like that.
    In
   addition, your JS code is only evaluated in the frontend, but all formulas have
   already been evaluated by that point.
 * Regards,
    Tobias
 *  Thread Starter [acrypto](https://wordpress.org/support/users/acrypto/)
 * (@acrypto)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-a1/#post-9795268)
 * Thank you for your fast reply.
 * I see. Do you think there is an alternative way of doing the above example? Like
   converting the string to a float, or use something else than shortcode to display
   the numbers? I don’t know if you could point me in the right direction of a possible
   solution.
 * Thank you.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-a1/#post-9796069)
 * Hi,
 * no, sorry, there is no direct way, simply as you are only retrieving the value
   via AJAX when the page is loaded.
 * Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘!ERROR! undefined variable ‘a1’’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/error-undefined-variable-a1/#post-9796069)
 * Status: resolved