Title: Error in formulas when duplicate
Last modified: January 5, 2023

---

# Error in formulas when duplicate

 *  Resolved [Dani](https://wordpress.org/support/users/danicasati/)
 * (@danicasati)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-in-formulas-when-duplicate/)
 * Hi.
 * I’ve a formula in a column to SUM certain cells.
 * If I select the column and if I duplicate it, plugin changes automatically references
   of cells formula in new column (for example, B2 is changed to C2) but in original
   column Tablepress changes references too.
 * I think that formula references must be the same in original column (B2 must 
   be B2) and change them ONLY in new column (B2 must be C2 in new column).

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-in-formulas-when-duplicate/#post-16347905)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * I see what you mean, but I’m actually not sure that this is a bug. It looks like
   the correct behavior to me, but this could depend on the exact table data.
 * “Duplicating” to me means that the two rows are the same after performing this
   action (and this is working correctly here).
 * The changed cell reference also is correct: As the cell that was referenced moved,
   the references to it need to be updated everywhere. Otherwise, formulas could
   suddenly be using wrong cells.
 * But as I said, there might be different requirements in your workflow here. Can
   you therefore maybe show me an example of your table (with the formulas, e.g.
   by posting a link to a screenshot of the “Edit” screen before and after)?
 * Regards,
   Tobias
 *  Thread Starter [Dani](https://wordpress.org/support/users/danicasati/)
 * (@danicasati)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-in-formulas-when-duplicate/#post-16347940)
 * It’s true, duplicate function is working correctly, because the column is duplicated.
 * But like in other spreadsheet, when user duplicate a column with formulas, references
   could remains unchanged, and updated only in duplicated column.
 * For example, I have 2 columns: A and B. In B column I have a simple formula in
   B4 (=B2+B3). If I duplicate B column, the new C column display the formula with
   updated references (formula in C4 changes to =C2+C3), but the formula in B2 changes
   too in =C2+C3.
 * I think that formula in B column must remain the same.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-in-formulas-when-duplicate/#post-16347985)
 * Hi,
 * ok, I see. Yes, in this example, the intention would be so that the reference
   should not be changed.
 * Unfortunately, it will not be that easy to change this, so that I suggest a workaround:
   Instead of using “Duplicate” here, do that step manually: Select all the cells
   in the column and Copy them (Ctrl/Cmd + C). Then, use “Insert on the left” to
   add an empty column. There, directly paste the copied content again (Ctrl/Cmd
   + V).
 * Best wishes,
   Tobias
 *  Thread Starter [Dani](https://wordpress.org/support/users/danicasati/)
 * (@danicasati)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-in-formulas-when-duplicate/#post-16347992)
 * I’m doing here right now.
 * It would be great to change it in future versions of the plugin, so, formulas
   references would be mantained in original column and changed ONLY in duplicate
   one.
 * Keep the great work!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/error-in-formulas-when-duplicate/#post-16348020)
 * Hi,
 * yes, I will look into that, but can’t make promises, as the “Duplicate” feature
   and the reference updating are in completely different parts of the code, and
   they don’t really know about each other :-/
 * Best wishes,
   Tobias

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

The topic ‘Error in formulas when duplicate’ 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: [3 years, 5 months ago](https://wordpress.org/support/topic/error-in-formulas-when-duplicate/#post-16348020)
 * Status: resolved