Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting an array range of cells???


Hi all, how do i write this as a range that wont cause an error in my
code?

Set rng =
Range("C4:C48,E4:E48,G4:G48,I4:I48,K4:K48,M4:M48,C 52:C94,E52:E94,G52:G94,I52:I94,K52:K94,M52:M94,C10 0:C142,E100:E142,G100:G142,I100:I142,K100:K142,M10 0:M142,C148:C190,E148:E190,G148:G190,I148:I190,K14 8:K190,M148:M190,C196:C238,E196:E238,G196:G238,I19 6:I238,K196:K238,M196:M238")

Hope you can help!

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=552445

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Setting an array range of cells???

Give this a try...

Set rng = Intersect(Range("C:C,E:E,G:G,I:I,K:K,M:M"), _
Range("4:48,52:94,100:142,148:190,196:238"))

--
HTH...

Jim Thomlinson


"Simon Lloyd" wrote:


Hi all, how do i write this as a range that wont cause an error in my
code?

Set rng =
Range("C4:C48,E4:E48,G4:G48,I4:I48,K4:K48,M4:M48,C 52:C94,E52:E94,G52:G94,I52:I94,K52:K94,M52:M94,C10 0:C142,E100:E142,G100:G142,I100:I142,K100:K142,M10 0:M142,C148:C190,E148:E190,G148:G190,I148:I190,K14 8:K190,M148:M190,C196:C238,E196:E238,G196:G238,I19 6:I238,K196:K238,M196:M238")

Hope you can help!

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=552445


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Setting an array range of cells???


Hi Jim worked a treat thanks!

Regards,
Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=552445

Reply
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
Setting up formatting for a range of cells [email protected] Excel Discussion (Misc queries) 0 January 4th 07 04:17 PM
setting color for range of cells blanks out gridlines Judy Excel Programming 1 March 14th 06 12:40 AM
Help finding error setting range to Visible Cells Ed Excel Programming 3 January 26th 05 06:11 PM
Setting number format on range of cells Neils Christoffersen Excel Programming 2 November 19th 04 10:20 PM
Setting range of cells format to currency Radek Michalski Excel Programming 1 December 20th 03 11:15 PM


All times are GMT +1. The time now is 09:39 PM.

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"