View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Loop through single column of named range

It's not always required, but it never hurts (and it can be painful if you
needed it and didn't use it!).

Andibevan wrote:

Thanks Dave - I was messing around with that idea but had missed the .cell
off the end of the statement

Ta muchly

"Dave Peterson" wrote in message
...
Dim myCell as range
dim myRng as range
set myrng = worksheets("somesheet").range("somename")
for each mycell in myrng.columns(3).cells
msgbox mycell.address '???
next mycell

There better be at least 3 columns in that range!


Andibevan wrote:

Hi,

I have a named range that covers A1:d4 - How do I loop through each cell

in
Column C of the named range.

I know how to do it for a 'non-named' range but not for a named range

TIA

Andi


--

Dave Peterson


--

Dave Peterson