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
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

pbornemeier

Well-known Member
Joined
May 24, 2005
Messages
3,884
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,721
Messages
5,597,752
Members
414,171
Latest member
12Rev79

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