View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Can I use array to simplify this code.

You received two good answers to your original post.

--
Regards,
Tom Ogilvy

"broogle" wrote in message
oups.com...
Sorry for the mess in the previous posting.

Can I use array to simplify this code.
Appreciate your help. Thanks

sub test()
Dim rngJ As Range
Dim rngK As Range
Dim rngL As Range
.
.
.
For Each Cell In rngK
---code---
next

For Each Cell In rngL
---code--- (same as above)
next

For Each Cell In rngM
---code--- (same as above)
next
.
.
.
end sub

------------------------

Notes: rngK, rngL and rngM located in different sheets.