Keep formula references when table deleted and replaced

rob51852

Board Regular
Joined
Jun 27, 2016
Messages
191
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I’ve got a table called DataTable and various formulas that reference the table using the table and column names.

When the table is deleted and replaced all the formula references mess up leaving me with #REF errors.

Is there an equivalent to the $ for table references to stop this happening?

Cheers
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
By deleting a table, are you deleting the sheet, or the rows of data, or the cells?

Bare in mind that once you delete any of those, any formulae which reference that data, will lose their reference to the cells, rows, sheet or whatever, as they cease to exist. They are ex-cells. They are no more.
Therefore the references point to nothing, which gives the #REF error.

If you re-write your formulae using VBA programming, then for example If you reference cell B15 on a sheet using Cells(15,2) or Range("B15") then B points to the spreadsheet at cell(15,2), regardless if you deleted that cell and it was replaced by another.

The reason for that is that references in Excel are fixed to a pointer to a location and the pointer once removed cannot be automatically replaced. Whereas VBA calculates the Cell location, when it runs.
 
Upvote 0

Forum statistics

Threads
1,224,271
Messages
6,177,618
Members
452,786
Latest member
k3calloway

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top