Combining multiple text cells into dedicated single cell, and inserting line break to separate text bulk in the dedicated single cell?

Ritvars

New Member
Joined
Jun 7, 2014
Messages
4
Hello,

I need to combine multiple product description texts which are in their own cells into a one single dedicated overall description cell which will encompass all the bulk texts from those separate cells, however not make all the text flow in single string without line breaks.

Required Fomula Result Example:
E1=
A1 "Short Description"
[line break]<line break="">
B1 "Full Description"
<line break="">[line break]
C1 "Nutrition"
<line break="">[line break]
D1 "Directions"

Let me know, how to do it please.</line></line></line>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Char(10) will give you a line break So you can enter "=CONCATENATE(A1,CHAR(10),B1,CHAR(10),C1,CHAR(10),D1)" in E1.
 
Upvote 0
Thank you for guideline, here is the final tested formula that really works, and has properly line-breaked those 4 different descriptions:

=CONCATENATE(A1&CHAR(10)&CHAR(10)&B1&CHAR(10)&CHAR(10)&C1&CHAR(10)&CHAR(10)&D1)

Had to apply double &CHAR(10)& formula in order for it to break an empty line between description texts.
 
Upvote 0
Ok, and now, lets take it to the next level!

As far as the formula was introduced in the previous thread, this is what it looks like in my case with added custom description titles in "TITLE", where column titles are used in Format as Table mode.

=CONCATENATE("SHORT DESCRIPTION"&CHAR(10)&CHAR(10)&[@[SHORT
DESCRIPTION]]&CHAR(10)&CHAR(10)&"DESCRIPTION"&CHAR(10)&CHAR(10)&[@DESCRIPTION])&CHAR(10)&CHAR(10)&"NUTRITION"&CHAR(10)&CHAR(10)&[@NUTRITION]&CHAR(10)&CHAR(10)&"DIRECTIONS"&CHAR(10)&CHAR(10)&[@DIRECTIONS]

How to write in this case a more advanced formula using =IF function or any other relavant on top of the mentioned previously, precisely, to write a full descriptive text with custom headings like indicated in the fomula above, where, if any of the descriptive information is missing in single or multiple columns as SHORT DESCRIPTION, DESCRIPTION, NUTRITION, DIRECTIONS, the formula would return only those custom heading with description which contain any information in the source cells?

Example of the idea

All info available in source cells in all categories:

SHORT DESCRIPTION
Abc
[line break]
DESCRIPTION
Abc
[line break]
NUTRITION
Abc
[line break]
DIRECTIONS,
Abc

Partial info available only in 2 source cells:

SHORT DESCRIPTION
Abc
[line break]
DESCRIPTION
Abc

Let me know what you can think of!
 
Upvote 0
Ok, and now, lets take it to the next level!

As far as the formula was introduced in the previous thread, this is what it looks like in my case with added custom description titles in "TITLE", where column titles are used in Format as Table mode.

=CONCATENATE("SHORT DESCRIPTION"&CHAR(10)&CHAR(10)&[@[SHORT
DESCRIPTION]]&CHAR(10)&CHAR(10)&"DESCRIPTION"&CHAR(10)&CHAR(10)&[@DESCRIPTION])&CHAR(10)&CHAR(10)&"NUTRITION"&CHAR(10)&CHAR(10)&[@NUTRITION]&CHAR(10)&CHAR(10)&"DIRECTIONS"&CHAR(10)&CHAR(10)&[@DIRECTIONS]

How to write in this case a more advanced formula using =IF function or any other relavant on top of the mentioned previously, precisely, to write a full descriptive text with custom headings like indicated in the fomula above, where, if any of the descriptive information is missing in single or multiple columns as SHORT DESCRIPTION, DESCRIPTION, NUTRITION, DIRECTIONS, the formula would return only those custom heading with description which contain any information in the source cells?

Example of the idea

All info available in source cells in all categories:

SHORT DESCRIPTION
Abc
[line break]
DESCRIPTION
Abc
[line break]
NUTRITION
Abc
[line break]
DIRECTIONS,
Abc

Partial info available only in 2 source cells:

SHORT DESCRIPTION
Abc
[line break]
DESCRIPTION
Abc

Let me know what you can think of!

Give this formula a try. In this example the texts to concatenate are in C1 - F1:

=IF(C1<>"","SHORT DESCRIPTION"&CHAR(10)&CHAR(10)&C1&CHAR(10)&CHAR(10),"")&IF(D1<>"","DESCRIPTION"&CHAR(10)&CHAR(10)&D1&CHAR(10)&CHAR(10),"")&IF(E1<>"","NUTRITION"&CHAR(10)&CHAR(10)&E1&CHAR(10)&CHAR(10),"")&IF(F1<>"","DIRECTIONS"&CHAR(10)&CHAR(10)&F1&CHAR(10)&CHAR(10),"")
 
Upvote 0
Brilliant!

Thank you István Hirsch for the provided formula, here is the visible side of it in my case:


=
IF([@[SHORT DESCRIPTION]]<>"","SHORT DESCRIPTION"&CHAR(10)&CHAR(10)&[@[SHORT DESCRIPTION]]&CHAR(10)&CHAR(10),"")&
IF([@DESCRIPTION]<>"","DESCRIPTION"&CHAR(10)&CHAR(10)&[@DESCRIPTION]&CHAR(10)&CHAR(10),"")&
IF([@NUTRITION]<>"","NUTRITION"&CHAR(10)&CHAR(10)&[@NUTRITION]&CHAR(10)&CHAR(10),"")&
IF([@DIRECTIONS]<>"","DIRECTIONS"&CHAR(10)&CHAR(10)&[@DIRECTIONS]&CHAR(10)&CHAR(10),"")


So if any of the 4 description cells are empty, then the final 5th cell will only display the information that is available along with the relevant custom header titles.


Note if you have used Alt + Enter to break column title e.g.
SHORT
DESCRIPTION

Then it will appear in the formula with a broken line too, example:

=
IF([@[SHORT
DESCRIPTION]]<>"","SHORT DESCRIPTION"&CHAR(10)&CHAR(10)&[@[SHORT
DESCRIPTION]]&CHAR(10)&CHAR(10),"")&
IF([@DESCRIPTION]<>"","DESCRIPTION"&CHAR(10)&CHAR(10)&[@DESCRIPTION]&CHAR(10)&CHAR(10),"")&
IF([@NUTRITION]<>"","NUTRITION"&CHAR(10)&CHAR(10)&[@NUTRITION]&CHAR(10)&CHAR(10),"")&
IF([@DIRECTIONS]<>"","DIRECTIONS"&CHAR(10)&CHAR(10)&[@DIRECTIONS]&CHAR(10)&CHAR(10),"")


Now, taking it to the formatting stage... How to create custom header titles bold in the formula provided?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,018
Messages
6,128,307
Members
449,439
Latest member
laurenwydo

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