View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
davidm davidm is offline
external usenet poster
 
Posts: 1
Default count up the occurences of non continuous value


for your 2nd requirement the following loop will do the sum for you:

For each c in range("W7:W"&[w65536].End(xlUp).row)
if c.value= "ON" Then
s= s +c.offset.(-19,0)
end if
next


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=386389