Excel 2013 - Recovering old data

CRUTHERFORD

Board Regular
Joined
Jul 10, 2014
Messages
107
Hi,

Brief Overview
In my document, there is a table from A1:D5. I have created two command buttons which use VBA to insert a blank new row or column.

What I'm looking for is another piece of VBA which will revert back to the original table from A1:D5 after either new rows or columns have been added.

Any ideas?

Thanks,
C
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,896
Create a "table backup" worksheet in that workbook

Add code to your command buttons that adds an empty row under any existing data on the table backup then copies the (thankfully small) table below the blank row with a timestamp in column E prior to inserting the new row or column. this code will run each time a new row or column is inserted.

Add an undo button that will delete the current table and copy the bottom most backup table back to the original location, then erase the data copied from the table backup worksheet.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,879
Messages
5,834,217
Members
430,264
Latest member
ddeboor

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
Top