View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Loop Until out of named range

This should work:

ntotal = 0
For Each cell in ActiveSheet.Range("HiField")
Range("CP1").Offset(ntotal, 0) = "Hi"
ntotal = ntotal + 1
Next

" wrote:

I have a Loop that I want to go until it is out of my named range
something like so


Lets say I have a named range called "HiField"
"""""""""""""""""""""""""""""""""""""""""""""""""" """""""
Dim ntotal as string

ntotal = 0

Do
Range("CP1").Offset(ntotal, 0) = "HI"
ntotal = ntotal + 1
Loop Until out of HiField <------This is were I need Help

How would I go about telling it to loop until out of named range