Formula or code to change formatting in cell

rmtimmah

Board Regular
Joined
May 14, 2007
Messages
153
Hi,

I have a formula to concatenate multiple cells to one cell. What I would like to do is have the second part of the text in Italics and on a new line. Formula at the moment is:

=CONCATENATE(IF(Question1!C$2="Yes",Question1!B$2 & " ",""),IF(Question1!C$3="Yes",Question1!B$3 & " ",""))

So I would like to see the result look like this in one cell:

Text1
Text2
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Well, we can do the part about putting the 2nd text on a new line.
But you cannot format a portion of the formula's result in italics...Sorry.

=CONCATENATE(IF(Question1!C$2="Yes",Question1!B$2 & " ",""),CHAR(10),IF(Question1!C$3="Yes",Question1!B$3 & " ",""))
You will have to go to Format - Cells - Alignment and check "Wrap Text"
 

Forum statistics

Threads
1,170,989
Messages
5,873,164
Members
432,966
Latest member
Chain747

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
Top