PDA

View Full Version : [SOLVED:] How to move column of data down (shift it by 1 row)



vangog
12-31-2021, 06:35 AM
I have created two tables by macro. Column A and B is reserved for table 1. C is empty. D will contain IDs from 1 up... but now it is empty. In column E I have strings of districts. Headers are in first row. Now I need to add to the columns D, E values 0 and "not selected". So I need to move the data column E down. So question is:
How to move data in range E2:E15 to E3:E16?

Bob Phillips
12-31-2021, 06:44 AM
In VBA?


Range("E2:E15").Cut Destination:=Range("E3:E16")

or if you want to be a bit more flexible


Dim rng As Range

Set rng = Range("E2:E15")
rng.Cut Destination:=rng.Offset(1)

vangog
12-31-2021, 07:21 AM
Thank you