Moving a value in Column D

  • Thread starter mohd21uk via OfficeKB.com
  • Start date
M

mohd21uk via OfficeKB.com

I have a spreadsheet with values in a couple of cells in Column E. The rest
of the cells are blank. I would like a macro that would move the value of any
cell containing data (non empty cells) four cells backwards and two cells
downwards to Column A. Is there a macro that would do this.
 
A

Ardus Petus

Sub MoveIt()
Dim rCell As Range
For Each rCell In Columns("E") _
.SpecialCells(xlCellTypeConstants)
rCell.Offset(2, -4).Value = rCell.Value
rCell.ClearContents
Next rCell
End Sub

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top