2 question: Concatination of Array and access to arrays element in cell

IlyaK

New Member
Joined
Apr 18, 2016
Messages
23
Hi everyone!

Here is a task about array, I can't resolve.

I have the array like {text1,text2,text3} and I want to joint elements of the array in string like "text1text2text3"
I try to use array formulas, but it doesn' work :( Why Mcrosoft haven't realize sum-like formula for text :confused:

And one more question about arrays: Is any way to get element of array from cell with formula like above:
"={text1,text2,text3}"? If there isn't, may be some MVP-s could offer to realize that function to MS? ;)

Many thanks for replies!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi

I have the array like {text1,text2,text3} and I want to joint elements of the array in string like "text1text2text3"
I try to use array formulas, but it doesn' work :( Why Mcrosoft haven't realize sum-like formula for text :confused:

To concatenate a range you can use the function TEXTJOIN() available since excel 2016.

If you have an older version you can use vba and, for ex., write a udf.


And one more question about arrays: Is any way to get element of array from cell with formula like above:
"={text1,text2,text3}"? If there isn't, may be some MVP-s could offer to realize that function to MS? :wink:

For ex., you evaluate the cell formula and then use INDEX().

Also in this case you can use vba and write a udf, or use a name to evaluate the cell.
 
Last edited:
Upvote 0
try this function
Code:
Function j(ParamArray t())
dim i as integer
for i = lbound(t) to ubound(t)
j=j & t(i)
next i
end function
=j(text1,text2,text3)
 
Last edited:
Upvote 0
@Aladin & pgc01. You're right (CONCAT is avail. in >/= XL 2016). Sorry about that and thanks for pointing this out
 
Upvote 0
Hi! Thanks everyone for replies!

@pgc01: Yes, indeed, I could use VBA and named ranges, but possibility of getting elements from array stored in cell would be great, isn't it? Also if i will use udf, it could be mach more slowly than regular formula (even CSE) or..?

@Aladin: unfortunately I have 2013 version. I have read description of concat() function and haven't seen example that show possibility of use range (more than 1 cell) as argument, is it realy could do that unlike concantination()?
 
Upvote 0
Try to search for ACONCAT...

Hi! Thanks everyone for replies!

@pgc01: Yes, indeed, I could use VBA and named ranges, but possibility of getting elements from array stored in cell would be great, isn't it? Also if i will use udf, it could be mach more slowly than regular formula (even CSE) or..?

@Aladin: unfortunately I have 2013 version. I have read description of concat() function and haven't seen example that show possibility of use range (more than 1 cell) as argument, is it realy could do that unlike concantination()?
 
Upvote 0
... but possibility of getting elements from array stored in cell would be great, isn't it?

Well, I must say i don't agree.

I think that 1 cell - 1 simple (scalar) value is a great design decision.

You say you want to store array elements.

The worksheet structure, a rectangular grid, is perfect to store array elements.

If you want to store 1D array elements you can use a vector, a group of contiguous cells either in the same column or in the same row.
If you want to store 2D array elements I can use a rectangular range of cells.

So, I really don't think that I need a cell to be able to store an array.
I use the worksheet row-column grid and store the elements of an array in a way that makes it simple to read, search, substitute, insert, delete, ...

We can, of course, agree to disagree. :)
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top