Moving the contents one cell up in a column

Solved/Closed
sumit - Mar 9, 2010 at 11:06 PM
 Sumit - Mar 11, 2010 at 02:16 AM
Hello,
In my excel sheet the column C has contents in alternate cells starting from C1 till end. It looks like
C
1 heading
2
3 d1
4
5 d2
6
. .
. .

Now i want to move the content one cell up in the column except the heading. It should look like
C
1 heading
2 d1
3
4 d2
5
6 d3
. .
. .

Can u give the code for this modification.

Thank you

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Mar 10, 2010 at 12:34 PM
You could have easily seen it by recording macro and recording action.

Range("C2").Select
Selection.Delete Shift:=xlUp
1
thanks a lot..... it was really easy.
0