View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Only step through cells that are "Active"

Hi
try something like

for each cell in usedrange
'...

--
Regards
Frank Kabel
Frankfurt, Germany

"WintonCw" schrieb im Newsbeitrag
...
I need to write a macro that will perform an operation on every cell

on the page -- but only those in th earea I've worked in. The one I've
written now goes through all 65,000x65,000 cells which I most
definitely DON'T want to do! This is the loop I've currently
written -- how do I qualify it to stay within the active range?

(btw--the range is variable, so I can't do something like:
For Each cell In Range(Cells(1, 1), Cells(20, 10))
)


Current loop:
For Each cell In Cells
...
next cell


Thank you so much!