weggie
weggie

Reputation: 447

Change Text color by cell in excel

I have a formula that is doing some calculating of tickets that is garbing data from another cell. The client is asking if some colors can be used for the lines that contain the ticket information.

Here is the formula:

=CONCATENATE("2-Day Friday/Saturday ", P2 & CHAR(10) , "1-Day Friday ", R2 & CHAR(10) ,"1-Day Saturday ", T2 )

The client would like the calculation the text for 1-Day Friday to be bold and red, The 1-Day Sat to be bold and yellow and the 2 day passes to be bold in blue. Is this possible to do?

Thanks

Upvotes: 0

Views: 278

Answers (1)

dot.Py
dot.Py

Reputation: 5157

You can't apply more than one style setup in the same cell.

Excel can only display one colour at any given time, within any given cell.

I mean... your cell can't be formatted like 50% bold and 50% italic. Or 1 word yellow, 1 blue and 1 red... Styles are applied to the whole cell content.

But...

You can achieve what you want by using multiple cells in the same row, with different rules of conditional formatting for each state of nature that you want.

In your example, more precisely, you'll have:

    A                         B
1   2-Day Friday/Saturday     P2
2   1-Day Friday              R2
3   1-Day Saturday            T2

This way your multiple cells will represent one "cell" and you can set their formatting conditionally via VBA.

Upvotes: 1

Related Questions