View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Breakfast Guy[_4_] Breakfast Guy[_4_] is offline
external usenet poster
 
Posts: 1
Default Delete rows of data in multiple sheets


Your code is set to delete everything under the row where the words
"Title for Month" is found, anyway here it is fixed!

Sub DeleteData()
Dim sh As Worksheet
TargetCol = "A"
Application.ScreenUpdating = False
For Each sh In Sheets
sh.Select
Set f = Columns(TargetCol).Find(What:="Title for Month")
fRow = f.Row
LastRowToDelete = Cells(fRow, TargetCol).End(xlDown).Row
Range(Rows(fRow + 1), Rows(LastRowToDelete)).Delete
Next
Application.ScreenUpdating = True
End Sub


--
Breakfast Guy
------------------------------------------------------------------------
Breakfast Guy's Profile: http://www.thecodecage.com/forumz/member.php?userid=5
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=7255