'Best way to move all data on a sheet over by a few columns? (VBA)
I am looking for the best way to move all the data on a sheet over by 5 columns. I dont want to insert new cells because I want the cell references to stay the same for certain cells. There will always be data (with some blank cells) from row 4 to 486, but every week there will be new data added to the first 5 columns so the numbers of columns with data will always be increasing. I have tried the following:
1. Range("A:E").EntireColumn.Insert
which as the stated, didnt work because i need the cell references to stay the same.
2.
Range("A4:CB486").Select 'CB486 just being some arbitrary cell that wont be filled for a while, ideally this would be a changing reference to whatever is the last column with data
Selection.Copy
Cells.Clear
Range("F4:CG486").PasteSpecial
this doesnt work and I am not sure why. Does anyone have a more effective/efficient method to go about this?
Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
