Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Insert Range Of Cells

Is it possible to insert a range of cells depending on cell value,
e.g.
A1 contains "Sheet2!B1:D3"
result should be
A B C
2 B1 C1 D1
3 B2 C2 D2
4 B3 C3 D3

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 527
Default Insert Range Of Cells

Hi
Array formulas are what you need.

On Sheet1 select The range needed off sheet2. In the activecell (a1) type =
and select the range on sheet2. Enter with Ctrl + Shift + Enter.

Note array formulas use more memory than normal formulas.

Regards
Peter

"firsttimer" wrote:

Is it possible to insert a range of cells depending on cell value,
e.g.
A1 contains "Sheet2!B1:D3"
result should be
A B C
2 B1 C1 D1
3 B2 C2 D2
4 B3 C3 D3

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Insert Range Of Cells

Ok, this works for an individual value,
How can I apply this to all vallues in a column.
e.g. sheet3 contains A1-A10:2,1,3,1,2,etc.
In sheet1 the wanted result should be
A B C
1 B1 C1 D1 (range2)
2 B2 C2 D2
3 B1 C1 D1 (range1)
4 B1 C1 D1 (range3)
5 B2 C2 D2
6 B3 C3 D3
7 B1 C1 D1 (range1)
8 B1 C1 D1 (range2)
6 B2 C2 D2


Thanks in advance

"Billy Liddel" wrote:

Hi
Array formulas are what you need.

On Sheet1 select The range needed off sheet2. In the activecell (a1) type =
and select the range on sheet2. Enter with Ctrl + Shift + Enter.

Note array formulas use more memory than normal formulas.

Regards
Peter

"firsttimer" wrote:

Is it possible to insert a range of cells depending on cell value,
e.g.
A1 contains "Sheet2!B1:D3"
result should be
A B C
2 B1 C1 D1
3 B2 C2 D2
4 B3 C3 D3

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Insert Range Of Cells


try this to get the values in the same lactation.

Sub getfromrange()
With Range("a1")
mloc = InStr(.Value, "!")
msheet = Left(.Value, mloc - 1)
mange = Right(.Value, Len(.Value) - mloc)
For Each c In Sheets(msheet).Range(mrange)
Range(c.Address) = c
Next c
End With
End Sub


--
Don Guillett
SalesAid Software

"firsttimer" wrote in message
...
Is it possible to insert a range of cells depending on cell value,
e.g.
A1 contains "Sheet2!B1:D3"
result should be
A B C
2 B1 C1 D1
3 B2 C2 D2
4 B3 C3 D3


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Insert Range Of Cells

Would an array formula be OK (entered with shift ctrl enter) be OK. In this
case simply select the required range, enter the formaula as you gave it and
hit shift+ctrl+enter ????

"firsttimer" wrote:

Is it possible to insert a range of cells depending on cell value,
e.g.
A1 contains "Sheet2!B1:D3"
result should be
A B C
2 B1 C1 D1
3 B2 C2 D2
4 B3 C3 D3



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
Insert a column within a range of cells Retirement Guy Excel Worksheet Functions 4 June 23rd 07 12:04 AM
Insert range of cells with a function firsttimer Excel Worksheet Functions 2 May 29th 07 09:43 AM
Sum Cells or Range and Insert Value into Cell Bill Ray Excel Programming 1 March 21st 06 05:43 AM
How to insert formula to a range of cells from VBA? crapit Excel Programming 10 March 18th 05 01:38 PM
How can I insert a space before the last character in a range of cells Jeff[_25_] Excel Programming 8 November 13th 03 07:45 PM


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