Move Total from Column B to A

  • Thread starter Thread starter dd
  • Start date Start date
D

dd

Hi,
Below is a macro to move any cells that contain the word Total in
Column A to Column B.
But how would I move the word total from column B to column A? Thanks

Sub testing()
For Each cell In Columns("A").SpecialCells(xlCellTypeConstants)
If cell.Value Like "*Total*" Then
cell.Offset(0, 1).Value = cell.Value
cell.Value = ""
End If
Next cell
End Sub
 
Sub testing()
For Each cell In Columns("B").SpecialCells(xlCellTypeConstants)
If cell.Value Like "*Total*" Then
cell.Offset(0, -1).Value = cell.Value
cell.Value = ""
End If
Next cell
End Sub

Regards

Trevor
 
Thanks for the fast response.


Sub testing()
For Each cell In Columns("B").SpecialCells(xlCellTypeConstants)
If cell.Value Like "*Total*" Then
cell.Offset(0, -1).Value = cell.Value
cell.Value = ""
End If
Next cell
End Sub

Regards

Trevor
 
Back
Top