Dear All,
I need help on Excel 2007 Macro , the below coding searches for a string "recvtiming" in a cell as a wildcard and delete it entire row once it founds it in a single active sheet.
Question,
1. How do I manipulate it to search for the same string and upon finding
a) Delete its cell content and all the contents from its right hand of side till its last column which have a value from the same row on all 50 sheets in the workbook.
e.g
a b c d recv 0 1 2 3 4
It should return,
a b c d
====================Start Code ====================
With ActiveSheet
.Select
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView
.DisplayPageBreaks = False
Firstrow = .UsedRange.Cells(1).Row
Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
'Loop from Firstrow to Lastrow
For Lrow = Firstrow To Lastrow
Firstcol = .UsedRange.Cells(1).Column
Lastcol = .UsedRange.Columns(.UsedRange.Columns.Count).Column
Currentcell = ActiveCell.Address.Column
If Application.CountIf(.Rows(Lrow), "recv*") > 0 Then Range(Cells(Lrow, Currentcell), Cells(Lrow, Lastcol)).ClearContents
Next Lrow
End With
====================End Code ====================
Bookmarks