Text output in Conditional Formatting

Anonymous
2017-08-10T19:08:53+00:00

Hi there,

I am trying to put a conditional formatting in column G, where if column F value is equal to column E value, column G should show a text as "Local" with green highlight else value of column F without any highlight.

I couldn't put a text in conditional formatting where as I entered a formula in column G such that it fulfils my wish and able to only highlight through formatting.

Can someone help me in putting text through conditional formatting?

***Post moved by the moderator to the appropriate forum category.***

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. HansV 462.4K Reputation points MVP Volunteer Moderator
    2017-08-10T19:50:55+00:00

    Select G2:G10. I'll assume that G2 is the active cell within the selection.

    On the Home tab of the ribbon, click Conditional Formatting > New Rule...

    Select 'Use a formula to determine which cells to format'.

    Enter the formula

    =E2=F2

    or, if you don't want to highlight column G if E and F are blank:

    =AND(E2<>"",E2=F2)

    Click Format...

    Activate the Number tab of the Format Cells dialog.

    Select Custom in the list of Categories.

    Enter the following custom format in the Type box:

    "Local";"Local";"Local";"Local"

    Activate the Fill tab.

    Select Green.

    Click OK to close the Format Cells dialog.

    Click OK to close the New Formatting Rule dialog.

    Remark: the cells in column G should contain something - a value or a formula. If they are completely empty, the text "Local" will not be displayed.

    16 people found this answer helpful.
    0 comments No comments