View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default count with a range

or
Sub countem()
x = Application.CountIf(Range("a1:a100"), "y")
MsgBox x
End Sub
--
Don Guillett
SalesAid Software

wrote in message
oups.com...
I have a range that i have set as myrng
this range is A1:a100, in this range i have either a "n" or a "y" in
each cell, how can i use code to count all the y's within this range

john