Thread: COUNTIF VBA
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Merritt Ave Merritt Ave is offline
external usenet poster
 
Posts: 3
Default COUNTIF VBA

Hello - I wanted to incorporate a COUNTIF in VBA (not onto the spreadsheet) that
will precede this code. I would like the COUNTIF to first assess whether an instance of MISC appears in the cells of column 14. If TRUE, then proceed with the code. If FALSE, then skip this code and continue with the next step in the routine (does not exit the routine - there are further routine steps to follow).
Thank you very much in advance!

Worksheets("Check").Range("A1").AutoFilter Field:=14, Criteria1:="MISC"
Application.DisplayAlerts = False
ActiveSheet.UsedRange.Offset(1, 0).Resize(ActiveSheet.UsedRange.Rows.Count - 1).Rows.Delete
Application.DisplayAlerts = True
ActiveSheet.ShowAllData