How to Merge an array into Single cell

earthworm

Well-known Member
Joined
May 19, 2009
Messages
759
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
This might look simple but it is not . How can you merge the multiple values into single cell

={"D";"C";"B";"A"}

With reference to above , the first answer is "D" i want it to appear as DCBA . The length of result can vary .

The reason of my above query is I want to reverse a value of single cell and them merge my result into single cell

example

ABCD = DCBA

Formula : =MID(A1,LARGE(ROW(INDIRECT(1&":"&LEN(A1))),ROW(INDIRECT(1&":"&LEN(A1)))),1)

With reference to above formula , the formula is showing me the result , however its not showing the combine result in single value . I can get the answer my merging the formula according to length of text / value but that is manual activity . What if the length of value varies .

I don't want to use excel ad in.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Excel is hopeless at concatenation so there is no simple way using built-in functions. For up to 20 characters you can use:

=MID(A1,20,1)&MID(A1,19,1)&MID(A1,18,1)&MID(A1,17,1)&MID(A1,16,1)&MID(A1,15,1)&MID(A1,14,1)&MID(A1,13,1)&MID(A1,12,1)&MID(A1,11,1)&MID(A1,10,1)&MID(A1,9,1)&MID(A1,8,1)&MID(A1,7,1)&MID(A1,6,1)&MID(A1,5,1)&MID(A1,4,1)&MID(A1,3,1)&MID(A1,2,1)&MID(A1,1,1)

Or you can use this UDF:

Code:
Public Function RevStr(Rng As Range)
    RevStr = StrReverse(Rng.Text)
End Function

like this:

=RevStr(A1)
 
Upvote 0
Thank you soo much for this UDF

By the way whats UDF and how can i explore more function like this
 
Upvote 0
UDF is an acronym for User Defined Function. Search Google for 'UDF Excel' and you will get lots of hits.
 
Upvote 0

Forum statistics

Threads
1,215,231
Messages
6,123,754
Members
449,118
Latest member
kingjet

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