Title: Pulling data from one table into another
Last modified: June 23, 2017

---

# Pulling data from one table into another

 *  Resolved [nsca2017](https://wordpress.org/support/users/nsca2017/)
 * (@nsca2017)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pulling-data-from-one-table-into-another/)
 * I have two tables, Table A and Table B. Table A has all of the raw data with 
   a column that adds all of the numerical values for that row together. In table
   B I would like to pull some of the cells from table A. Using the single cell 
   content shortcode, I am able to pull the string data into table B, but if I try
   to pull the column that has the totals from table A into table B I get the formula
   and not the numerical value. If I try to pull the individual numerical values
   from table A into table B and then sum or add them together I receive the error“!
   ERROR! illegal character ‘[‘” if I try to convert the value with NUMBER_FORMAT()
   or “!ERROR! C2 does not contain a number or expression” if I simply try to add
   the values I am pulling in.
 * Is there a way to accomplish what I am trying to or can I simply have one table
   Table A for example that has two different table width/styling using just the
   shortcode?

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pulling-data-from-one-table-into-another/#post-9257152)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Using the “Single Cell Shortcode Extension” to pull in the evaluated formulas
   will not work unfortunately 🙁 It is however possible to use formulas on cells
   that have such a `[table-cell ... /]` Shortcode, if you also install the “Shortcodes
   before Formulas Extension”, described at [https://wordpress.org/support/topic/referencing-data-from-another-tables-and-formulas/#post-7012433](https://wordpress.org/support/topic/referencing-data-from-another-tables-and-formulas/#post-7012433)
 * Now, having just one table A and applying different styling to it would of course
   also work! If you are displaying this on different pages, you could either use
   a CSS selector like `.page-id-123 .tablepress-id-A ...` (where 123 is the ID 
   of the WordPress page), or you could also add a special/extra CSS class to the
   table, by adding another parameter in one of the used Shortcodes:
 *     ```
       [table id=A extra_css_classes="tablepress-id-A-different-styling" /]
       ```
   
 * (`tablepress-id-A-different-styling` is an invented string, you could use any
   other CSS selector that makes sense, and then use CSS like
 *     ```
       .tablepress-id-A-different-styling ... { ... }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [nsca2017](https://wordpress.org/support/users/nsca2017/)
 * (@nsca2017)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pulling-data-from-one-table-into-another/#post-9261785)
 * That’s perfect, thank you.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/pulling-data-from-one-table-into-another/#post-9261850)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/)
   here in the plugin directory. Thanks!

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

The topic ‘Pulling data from one table into another’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/pulling-data-from-one-table-into-another/#post-9261850)
 * Status: resolved