Thread: CountIF in VBA
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default CountIF in VBA

intErrors = Application.CountIF(Rng, "No")


--
HTH

Bob Phillips

(replace xxxx in email address with googlemail if mailing direct)

"lbargers" wrote in
message ...

Good afternoon,

Is there anyway that I can use the CountIF function in a macro that
would allow me to determine the number of "No" values in a row.

This is what I have so far, but it does not work this way... any
suggestions are appreciated

Dim rng As range
dim intErrors as integer

Set Rng = ws.Range(ws.Cells(k, 6), ws.Cells(k, 255))
intErrors = CountIF(Rng, "No")


Thanks Larry


--
lbargers
------------------------------------------------------------------------
lbargers's Profile:

http://www.excelforum.com/member.php...o&userid=32798
View this thread: http://www.excelforum.com/showthread...hreadid=545263