Move Range with Formatting

AlexanderBB

Well-known Member
Joined
Jul 1, 2009
Messages
1,954
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
With VBA Can I move everything in Col O-AL to P preserving each columns fore and back color?
I find paste special a bit fiddly and there's a lot to change. Rows 61 is the first.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
You are thinking about moving one-right so may be:
VBA Code:
    Range("O61:O1000").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
replace 1000 with needed last row number. For instance if column O is filled down to the bottom, and nothing is written below, an easy dynamic range could be created
VBA Code:
    Range(cells(61,"O"),cells(rows.count,"O").end(xlup)).Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove

if Right to AL column there is a content which shall not move, delete appropriate range right of your region (probably before adding empty column)
 
Upvote 0

Forum statistics

Threads
1,221,614
Messages
6,160,818
Members
451,671
Latest member
kkeller10

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