Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add characters to a cell Excell 1

Status
Not open for further replies.

Cpreston

MIS
Mar 4, 2015
972
GB
Hi

I have a cell of Text which I want to add some characters to and then join them all together in one string separated by a comma.

I have managed to join all 455 rows with a comma using this formula =TEXTJOIN(",",TRUE,A1:A455)

A-GRN-R2-ARM1,A-GRN-R2-ARM2, etc......

However I want to produce the below with the ' at the start and end of each cell and then the comma

'A-GRN-R2-ARM1','A-GRN-R2-ARM2', etc....

I have played with the formula but can not get it to produce it correctly

Any ideas pleas.

Thanks in advance

 
You can add "'" before and after the formula:
[tt]="'"&TEXTJOIN(",",TRUE,A1:A455)&"'"[/tt]

combo
 
Hi Combo

I tried your formula and I get this

'A-GRN-R2-ARM1,A-GRN-R2-ARM2' etc

What I am trying to acheive is

'A-GRN-R2-ARM1',A-GRN-R2-ARM2','next code','next code' etc....

Many thanks
 
If you replace "," by "','" in TRXTJOIN separator you should get what you expect.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top