Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Need function to raplace cell value by a range

In column A I have values(strings) wich I need to replace by ranges
e.g.
range1=("rng1.1","rng1.2","rng1.3")
range2=("rng2.1","rng2.2")
range3=("rng3.1","rng3.2","rng3.3","rng3.4")

range2
range1
range3
should result in
rng2.1
rng2.2
rng1.1
rng1.2
rng1.3
rng3.1
etc

Thank U very much in advance

Shared knowledge makes you smarter
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Need function to raplace cell value by a range

Hi
It isn't obvious to me what you want.
regards
Paul

On Jun 7, 8:00 am, Excel ESG
wrote:
In column A I have values(strings) wich I need to replace by ranges
e.g.
range1=("rng1.1","rng1.2","rng1.3")
range2=("rng2.1","rng2.2")
range3=("rng3.1","rng3.2","rng3.3","rng3.4")

range2
range1
range3
should result in
rng2.1
rng2.2
rng1.1
rng1.2
rng1.3
rng3.1
etc

Thank U very much in advance

Shared knowledge makes you smarter



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Need function to raplace cell value by a range

If you mean that "rng1.1","rng1.2" etc are range names, then:
Dim BigRange As Range
Set BigRange = Union(Range("rng1.1"), Range("rng1.2"))

so if these names are held in A1, A2 etc
Dim BigRange As Range
Set BigRange = Union(Range(Range("A1").Value), Range(Range("A1").Value))

Also, I'm not sure if "." is completely safe in a Name. Maybe use "_" to
avoid any issues.

NickHK

"Excel ESG" wrote in message
...
In column A I have values(strings) wich I need to replace by ranges
e.g.
range1=("rng1.1","rng1.2","rng1.3")
range2=("rng2.1","rng2.2")
range3=("rng3.1","rng3.2","rng3.3","rng3.4")

range2
range1
range3
should result in
rng2.1
rng2.2
rng1.1
rng1.2
rng1.3
rng3.1
etc

Thank U very much in advance

Shared knowledge makes you smarter



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
SUMPRODUCT - use last cell function for range SteveT Excel Discussion (Misc queries) 2 January 7th 09 04:53 PM
function problem regarding cell range chindo Excel Worksheet Functions 1 November 10th 05 03:06 AM
Function to determine if any cell in a range is contained in a given cell [email protected] Excel Worksheet Functions 3 February 7th 05 04:19 PM
function cell range limitations AXA Excel Worksheet Functions 3 January 30th 05 11:09 PM
Cell in Range Testing Function Jim C.[_2_] Excel Programming 2 July 23rd 03 06:59 PM


All times are GMT +1. The time now is 12:30 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"