Forum Discussion

bbsin's avatar
bbsin
Iron Contributor
Jul 22, 2024

how to set the icon with text under conditional formula?

hi 

Can please advise how to set based on the legend

When I input 0 to display color icon with text at the side and and rest.

and have the cell color in different colors based on the legend

Thank you

 

1 Reply

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    bbsin 

    Here is an example you can follow to achieve your goal:

    Step-by-Step Example to Create Conditional Formatting with Icons and Text

    1. Prepare Your Data:
      • Let's assume you have a column with status values (0, 1, 2, etc.) in column A starting from A2.
    2. Create Custom Icons Using Unicode Characters:
      • In Excel, certain Unicode characters can be used as icons. For example:
        • Checkmark (✓): Unicode U+2713
        • Cross (✗): Unicode U+2717
        • Exclamation Mark (!): Unicode U+0021
    3. Applying Conditional Formatting:
      • Select the range A2:A100 (or as needed).
    4. Conditional Formatting for Value 0:
      • Go to Home > Conditional Formatting > New Rule.
      • Select Use a formula to determine which cells to format.
      • Enter the formula:

    =$A2=0

      • Click on Format, go to the Fill tab, and select green as the background color.
      • Go to the Number tab, select Custom, and enter the following custom format:

    "✓ Completed"

      • Click OK.
    1. Conditional Formatting for Value 1:
      • Repeat the steps above but use the following formula and custom format:

    =$A2=1

      • Custom Format:

    "✗ Pending"

      • Set the background color to red.
    1. Conditional Formatting for Value 2:
      • Repeat the steps again with the following formula and custom format:

    =$A2=2

      • Custom Format:

    "! In Progress"

      • Set the background color to yellow.

    Final Notes

    • Adjust Column Width: Make sure the column width is sufficient to display the icons and text.
    • Testing: Input different values (0, 1, 2, etc.) in your range to see the conditional formatting in action. The text and steps were edited with the help of AI.

     

    Note: Attached is an example file that I got from the internet a long time ago, unfortunately I can't remember which address it was from. It contains an example in the direction you want.

     

    My answers are voluntary and without guarantee!

     

    Hope this will help you.

    Was the answer useful? Mark as best response and Like it!

    This will help all forum participants.

Resources