Macro for Archiving

sprucethebruce

Board Regular
Joined
Jul 22, 2010
Messages
78
I've got a group of cells I want to archive, the information is put in by someone else on a daily basis. I want the archiving to happen by filling up the top column then when the end is reached it automatically moves down 45 rows goes back to the start and repeats again.

I have no problem with the getting a macro to fill one row, its the moving down 45 rows once it reaches the end and starting again.

Anyone able to help me on this one?

Its A1:H45 on a worksheet named 'Copy', archiving to a worksheet in same workbook called 'archive'.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
OK, I'm nearly there. I think. I've done some workarounds which have stopped the need for any tricky programming.

One last thing that seems to be failing me is, the recorded part of the macro where I'm copying the cells, it comes up with a bug everytime.

I'm trying to paste it so it is values only and maintains original source formatting.

Code:
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
 
Upvote 0

Forum statistics

Threads
1,224,519
Messages
6,179,263
Members
452,902
Latest member
Knuddeluff

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