View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ibeetb ibeetb is offline
external usenet poster
 
Posts: 67
Default Increment a variable while looping

I have a procedure that loops through a range...I want this variable to
increment each time it comes upon an instance of something.
Ex:
For each cell in range
if cell.hasformula then
n="something"
end if
next cell

I want n to hold the value until it is finished looping and have a count of
the number of times cell.hasformula was true