Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 395
Default Join non-contiguous ranges into one range via named range?

I'm certain that I did this some years ago, but can't recall how.

I have two separate (non-contiguous) ranges that I need Excel to see as one
range so I can use it as the source for a data validation list.

I've tried the obvious, such as comma, semicolon, colon, ampersand, but
either my syntax is wrong, or none of those are the right way to do it.

Any suggestions?

Thanks!
Keith
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Join non-contiguous ranges into one range via named range?

This is one way to make a range out of two pieces:

Sub rangeRover()
Set r = Range("A1:A10,C1:C4")
r.Select
End Sub

--
Gary''s Student - gsnu200850


"ker_01" wrote:

I'm certain that I did this some years ago, but can't recall how.

I have two separate (non-contiguous) ranges that I need Excel to see as one
range so I can use it as the source for a data validation list.

I've tried the obvious, such as comma, semicolon, colon, ampersand, but
either my syntax is wrong, or none of those are the right way to do it.

Any suggestions?

Thanks!
Keith

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Join non-contiguous ranges into one range via named range?

Maybe you can create a contiguous range on another (hidden?) worksheet. You
could use formulas that point back to the original ranges. Then use this for
the data|validation list source.

Or maybe you could use code to apply the data|validation. The code would create
the comma separated list -- just like you typed it by hand.

But that would suffer the same restrictions (not too long and no commas in any
of the strings and case sensitive) that you get when you do it manually. And
the code would have to reapply the Data|Validation if you changed any of the
values in either range.

ker_01 wrote:

I'm certain that I did this some years ago, but can't recall how.

I have two separate (non-contiguous) ranges that I need Excel to see as one
range so I can use it as the source for a data validation list.

I've tried the obvious, such as comma, semicolon, colon, ampersand, but
either my syntax is wrong, or none of those are the right way to do it.

Any suggestions?

Thanks!
Keith


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Join non-contiguous ranges into one range via named range?

Hi Keith

I put a coded solution to you problem at the end of your previous thread on
this matter.

--
Regards
Roger Govier

"ker_01" wrote in message
...
I'm certain that I did this some years ago, but can't recall how.

I have two separate (non-contiguous) ranges that I need Excel to see as
one
range so I can use it as the source for a data validation list.

I've tried the obvious, such as comma, semicolon, colon, ampersand, but
either my syntax is wrong, or none of those are the right way to do it.

Any suggestions?

Thanks!
Keith


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
Non-Contiguous Named Range? Héctor Miguel Excel Discussion (Misc queries) 0 August 16th 08 06:22 AM
Non-contiguous named range JoeMNY Excel Discussion (Misc queries) 6 November 16th 07 07:39 PM
Range matching multiple named Ranges ben simpson Excel Discussion (Misc queries) 0 March 15th 06 06:45 PM
Charting only Used Range with Named Ranges cooter24 Charts and Charting in Excel 3 January 27th 06 03:00 AM
Excel will not include all of my non-adj ranges in a named range?? Renlimanit Excel Worksheet Functions 3 September 22nd 05 02:34 PM


All times are GMT +1. The time now is 08:13 AM.

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

About Us

"It's about Microsoft Excel"