View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Karin Karin is offline
external usenet poster
 
Posts: 125
Default macro to remove cells (not absolute)

It does not seem to be working - does it need to select the 4 cells before
the Delete?

"Gary''s Student" wrote:

Sub Karin()
Dim s As String, r As Range
s = "Grand Total"
For Each r In ActiveSheet.UsedRange
If r.Value = s Then
Range(r.Offset(1, 0), r.Offset(4, 0)).Delete Shift:=xlUp
Exit Sub
End If
Next
End Sub

--
Gary''s Student - gsnu200838