Title: using advanced custom fields, formulas not working
Last modified: August 22, 2016

---

# using advanced custom fields, formulas not working

 *  Resolved [bearvv](https://wordpress.org/support/users/bearvv/)
 * (@bearvv)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/using-advanced-custom-fields-formulas-not-working/)
 * I tried to make a very simple table and want to test formulas is working or not
   if I use advanced custom fields. It seems there is some error.
 * Here is the table that I created:
 * A1=<?php the_field(‘test1’); ?>
    A2=<?php the_field(‘test2’); ?> A3=A1+A2
 * Tablepress return me an error message: !ERROR! A3 does not contain a number or
   expression
 * Any body know how to fix it? Thanks.
 * [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, 10 months ago](https://wordpress.org/support/topic/using-advanced-custom-fields-formulas-not-working/#post-5444948)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * First of all, I assume that you are using the “PHP in tables” Extension to make
   the use of that PHP code possible?
 * The reason for this is that the formulas are evaluated before the PHP code, and
   thus the formulas fail.
    As a workaround, I would suggest to not use PHP directly,
   but to turn this PHP code into a custom Shortcode. You could then use the TablePress
   Extension from [http://tablepress.org/extensions/shortcodes-before-formulas/](http://tablepress.org/extensions/shortcodes-before-formulas/)(
   see [https://wordpress.org/support/topic/shortcode-used-in-cell?replies=6#post-4542150](https://wordpress.org/support/topic/shortcode-used-in-cell?replies=6#post-4542150)
   for instructions).
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

 The topic ‘using advanced custom fields, formulas not working’ 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, 10 months ago](https://wordpress.org/support/topic/using-advanced-custom-fields-formulas-not-working/#post-5444948)
 * Status: resolved