Moving the contents one cell up in a column

Solved/Closed
sumit - 9 Mar 2010 à 23:06
 Sumit - 11 Mar 2010 à 02:16
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 28 January 2010 Status Contributor Last seen 5 May 2022 766
10 Mar 2010 à 12:34
You could have easily seen it by recording macro and recording action.

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