create a backup

NickYOW

New Member
Joined
Mar 5, 2021
Messages
24
Office Version
  1. 2010
Platform
  1. Windows
i am attempting to copy only changed cell in a column and copy them to a back up sheet. this is going through every cell, I would like to only copy and past only new changes.
its take to long to run through 164 lines when only 2 or 3 Cells have been change. I using the back up, as a back up and as part of a record for a undo command. I thought if filter out the blanks, I could skip over the blank cells. here is the code i have.

col = split(activecell.address(1,0), $)(0)
row = split(activecell.address(1,0), $)(1)

Cells(7, ActiveCell.Column).AutoFilter ActiveCell.Column, "<>"

selected = Sheets(originalsheet).Range(col & "" & row).address

Do While True

Sheets(originalsheet).Range(selected).Copy

erow = Sheets(originalsheet).Range(selected).row

Sheets(originalsheet).Paste Destination:=Sheets(backup).Range(selected)

If row = 172 Then

Exit Do

End If

selected = Sheets(originalsheet).Range(selected).Offset(1, 0).Address
row = row + 1
Loop
activesheet.showalldata

very helpful people here and once again reaching out.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,215,282
Messages
6,124,049
Members
449,139
Latest member
sramesh1024

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