View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default How to "return" the array element number in VBA

I think you are going to have a problem here... You are in a "For Each"
statement which by it's very nature requires you to go through each and every
element... No skipping allowed...
--
HTH...

Jim Thomlinson


"EagleOne" wrote:

2003

Challenge:

For Each myCell in myRange
.....
.....
'Would like to be able to move to the next myCell in a (non-contiguous)
'myRange if the current myCell.Value = 0. I do not know how to return
'the current myCell array element number AND to increment to the next
'non-zero "0" myCell.value
.....
.......
Next myCell