简体   繁体   中英

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM