I have tried to find a Function that can combine two Arrays into one.
Something like =CombineTwoArrays(Array1,Array2)
Array1 is a 1:n, Array2 is also 1:n
CombineTwoArrays is 2:n
Is there a simple way to do this?
I have tried to find a Function that can combine two Arrays into one.
Something like =CombineTwoArrays(Array1,Array2)
Array1 is a 1:n, Array2 is also 1:n
CombineTwoArrays is 2:n
Is there a simple way to do this?
Hi olasa,
By combining two arrays, what do you actually wanted to achieve, please share more. Thanks.
Regards,
DILIPandey
<click on below 'star' if this helps>
DILIPandey, Excel rMVP
+919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com
Take a look at http://www.cpearson.com/Excel/VBAArrays.htm
Is this what you mean?
![]()
Please Login or Register to view this content.
to add the values in 2 arrays (ranges) D1:G3 and D7:G9
you can use this UDF![]()
Please Login or Register to view this content.
You will have to enter this UDF as an arrayformula: ctrl-shift-enter![]()
Please Login or Register to view this content.
{=snb7(D1:G3,D7:G9)}
and autofill the adjacent cells correponding to the range's size
Last edited by snb; 02-05-2012 at 11:37 AM.
Hello everyone,
I appreciate all the replies but no success (see attached).
It looks like you have already given me a solution and - I am sure it's something simple - but I just can't get it to work.
Any Aha suggestions?
//Ola
---
I have this formula =ScatterChart(G34:H38;;;;;;;;;;;;;;;1841892) in another (big file)*.
Here I would like to replace G34:H38 with the new Function.
My x-y values comes from various rows in a large spreadsheet, but 'Sparklines for Excel' want (unfortunatelly) a continous region.
I have also tried
http://www.cpearson.com/excel/VBAArrays.htm (could not get it to work)
http://www.dailydoseofexcel.com/arch...bining-arrays/ (not working)
Maybe too simplistic, but couldn't you use the index-function?
Yes it's too simple for a matrix of ScatterCharts (see encl. picture).
The idea was to use a Function =CombineTwoArrays(Product1, Product2) that draws the data directly from the DataTable (row19).
To avoid to go via a ChartData table (row30) - where the number of combinations grows exponetially (messy).
'Sparklines for Excel' want a continous area (see function Fx row)... otherwise it would have been (too) easy.
//Ola
@wher
I think you are right:
see the attachment.PHP Code:
=INDEX($D$5:$G$7;2*(ROW(1:3)-1)+1;)
snb & wher, sorry but your suggestions are roughly what I already have (see the Book1.xlsm attachement).
The 'Sparkline for Excel' function =scatterchart(xyarea,,,) function want one continous area.
I need a single cell formula that can pass the whole xyarea (array) as one continouse area in one single cell. i.e. join row C20:G20 & C23:G23
I think I can only be done by a UDF, but do surprice me.
//Ola
you can union 2 ranges and make it a named range and use that in your formula.
![]()
Please Login or Register to view this content.
PHP Code:
function =scatterchart(snb2,,,)
Last edited by snb; 02-06-2012 at 10:08 AM.
snb, sorry but I just can't get anything to work.
I've tried all suggestions and I the closest I got was =0 otherwise i just get =#REF! or =#VALUE!
You can use either:
or![]()
Please Login or Register to view this content.
you can use the named range snb_qq in your formula. ( the only thing to prevent is using a 'reseved name', that's why snb2, snb7 doesn't work in E2007/E2010 because that is being reserved for a column).![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks