Thread: Counting Cells
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Pedro Marques Pedro Marques is offline
external usenet poster
 
Posts: 4
Default Counting Cells

Thanks Nick

I tried to use the application.worksheetfunction.countif

Using strRet = Application.WorksheetFunction.CountIf((Range(Cells (42, 2),
Cells(77, 2))), Cells.Value 0)

But it gives me an error.

Do you know what do I have to change?

"Nick" wrote in message
...
Thinking about it if you only want to count the number of
cells rather than sum them you should use

application.worksheetfunction.countif


-----Original Message-----
Hi
What code should I write in order to count only the

positive value of a
pre-defined range: Range(Cells(42, 2), Cells(77, 2))

Thanks
Pedro


.