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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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"
 
Upvote 0

Forum statistics

Threads
1,222,122
Messages
6,164,082
Members
451,871
Latest member
sanalytics

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