View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dd dd is offline
external usenet poster
 
Posts: 12
Default Move Total from Column B to A

Thanks for the fast response.


On Dec 18, 11:31 am, "Trevor Shuttleworth"
wrote:
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

"dd" wrote in ooglegroups.com...



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- Hide quoted text -- Show quoted text -