Still unable to get it right. Any help would be good.
Still unable to get it right. Any help would be good.
Try this:
![]()
Sub DeleteColumns() Dim rFind As Range Dim wks As Worksheet For Each wks In ActiveWorkbook.Worksheets With wks Set rFind = .UsedRange.Find(What:="recvtiming", _ LookIn:=xlValues, _ LookAt:=xlWhole, _ MatchCase:=False) Do Until rFind Is Nothing .Range(rFind, .Cells(rFind.Row, .Columns.Count)).ClearContents Set rFind = .UsedRange.FindNext(rFind) Loop End With Next wks End Sub
Entia non sunt multiplicanda sine necessitate
SHG,
It worked perfectly.
Could you advice where it failed earlier.Its for my own learning.
I will find way to close this thread as solved.
rgds
Saravanan K
This is an invalid construct:Could you advice where it failed earlier.
![]()
FoundIt(1, LastCol - FoundIt.Column).ClearContents
For that and other useful information, see the forum rules.I will find way to close this thread as solved.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks