I have macros, which search word "abc" in column D, the move this cell to column C:
I need the same only search range must be all active columns starting from D , e.g. D1:W5000. All found cells should move to column C.![]()
Sub MoveDataD() Dim myrange, cell As Range Set myrange = ActiveSheet.Range("D1:D500") For Each cell In myrange If Left(cell.Value, 3) = "abc" Then cell.Offset(0, -1).Value = cell.Value cell.ClearContents End If Next cell End Sub
Bookmarks