Hi,
I want to create a macro in Excel 2003 that will search every row of a sheet for the words "Account Information", "Currency" and "Ledger". If it finds a row with any occurence of the words listed above it should delete that row.
What I have so far is the following:
Sub Tidy_Up()
Dim rng As Range
Dim what As String
what = "Account Information"
Do
Set rng = ActiveSheet.UsedRange.Find(what)
If rng Is Nothing Then
Exit Do
Else
Rows(rng.Row).Delete
End If
Loop
End Sub
How do I incorporate the search for "Currency" and "Ledger"?
Many thanks in advance.
Kenneth.
I want to create a macro in Excel 2003 that will search every row of a sheet for the words "Account Information", "Currency" and "Ledger". If it finds a row with any occurence of the words listed above it should delete that row.
What I have so far is the following:
Sub Tidy_Up()
Dim rng As Range
Dim what As String
what = "Account Information"
Do
Set rng = ActiveSheet.UsedRange.Find(what)
If rng Is Nothing Then
Exit Do
Else
Rows(rng.Row).Delete
End If
Loop
End Sub
How do I incorporate the search for "Currency" and "Ledger"?
Many thanks in advance.
Kenneth.