View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dan Gesshel Dan Gesshel is offline
external usenet poster
 
Posts: 20
Default Running For Each-Next on Visible Cells Only

Hello.

I would like to run a For Each - Next loop on only visible cells in a range.
The range may or may not be filtered by the user. If it is filtered, I don't
want the loop to run on those cells that have been hidden.

So for example I have:

For Each Cells in MyRange
'code here
Next Cell

What do I need to put in this statement so it only looks for the visible
cells? Or is there something else I should be doing when declaring MyRange?
Anyone out there that can help me would be great.

Thanks.

Dan