Thread: Counting Cells
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Nick is offline
external usenet poster
 
Posts: 8
Default Counting Cells

Total = 0

For J = 42 to 77

If Cells(J, 2).Value 0 Then

Total = Total + Cells(J, 2).Value

Next J



-----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


.