conditional formatting - using icon for text

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. Windows
Hi
I understand I can use conditional formatting icons based on cells values. but I am wondering if I can use these icons somehow for text. Fro example I have a column which has "pass" and "fail" text, i want to put red flag if it is fail and green if it is pass, is that possible? thank you so much.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
You can do it by using a helper column

Create a table to assign negative and positive numbers to your text

1612758019168.png




Then enter the following formula in B12 and copy it down as shown below.

=VLOOKUP(A12,$A$1:$B$2,2,FALSE)

Then use conditional formatting as shown below and tick "Show Icon Only"


1612758117812.png


Kind regards
Saba
 

Attachments

  • 1612757992096.png
    1612757992096.png
    6.9 KB · Views: 4
  • 1612758054417.png
    1612758054417.png
    8.6 KB · Views: 5
Upvote 0
Solution
If you can change your "pass"/"fail" column text to numbers, like 1 for pass and -1 for fail, you can use conditional formatting plus cell number formatting to look like what you want.

First, set the conditional formatting like you wanted. I just make it green flag for >=0 and red flag for <0.
1612758730162.png


Next, select the entire column and set to Custom number format, and use this: [=1]"Pass";[=-1]"Fail";
1612758815181.png


1612758872453.png
 
Upvote 0
I note that you have marked post #2 as the accepted answer. If you are happy to have the icons in the adjacent column to the text like that then you could do this without the lookup table. Just use the formula shown in the formula bar here in the adjacent column.

1612759657352.png
 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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