LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 331
Default Set few range variables at once

Hi,

Is there a way to do the below implicitly in a loop or as array? Thank you!


Dim States As Range
Dim Alaska As Range, Alabama As Range, Arizona As Range 'etc

Set States = Range("a2:a51")

With States
Set Alaska = .Cells.Find("Alaska", lookat:=xlWhole, MatchCase:=False)
Set Alabama = .Cells.Find("Alabama", lookat:=xlWhole, MatchCase:=False)
'...
'..
'etc

End With

--
______
Regards,
Greg
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a range with three variables Saul Excel Discussion (Misc queries) 4 July 25th 08 02:21 PM
Range of variables Ed Excel Programming 2 August 5th 06 03:05 PM
Describing a Range with Variables mazo Excel Programming 2 May 9th 06 02:28 PM
Naming Range Variables scott Excel Programming 6 January 7th 05 10:37 PM
Range Variables Daniel[_7_] Excel Programming 1 November 20th 03 05:45 AM


All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"