Forum Discussion
Phil_Grant_Popi
Oct 16, 2023Copper Contributor
Excel, Color Cell A1 green if Cell B1 contains X.
How do I Color Cell A1 green if Cell B1 contains "paid"?
- Phil_Grant_PopiCopper Contributor
What is the formula if contains "paid" within several different words like "autopaid" or "paid in full" or "to be paid"?
- peiyezhuBronze Contributor="paid"=WEBSERVICE("http://e.anyoupin.cn/eh3/?preg_match~paid~" & B2)
- NikolinoDEGold Contributor=B1="paid"
=B1="autopaid"
=B1="paid in full"
=B1="to be paid"
In the same cell insert more Rules.
or...try to use this formula
=SUMPRODUCT(--ISNUMBER(SEARCH({"paid","autopaid","paid in full"},B1)))>0
- NikolinoDEGold Contributor
In Excel, you can use conditional formatting to color Cell A1 green based on the content of Cell B1. Here's how you can do it:
- Select Cell A1 or the range of cells you want to format based on the content of Cell B1.
- Go to the "Home" tab in the Excel ribbon.
- Click on "Conditional Formatting" in the "Styles" group.
- Choose "New Rule" from the dropdown menu.
- In the "New Formatting Rule" dialog box, select "Use a formula to determine which cells to format."
- In the "Format values where this formula is true" field, enter the following formula:
arduinoCopy code
=B1="paid"
This formula checks if the value in Cell B1 is equal to "paid."
- Click the "Format" button to set the formatting options. In the "Format Cells" dialog, go to the "Fill" tab, and select the green color you desire.
- Click "OK" in the "Format Cells" dialog to confirm the formatting.
- Back in the "New Formatting Rule" dialog, you'll see a preview of how the formatting will look. Click "OK" to apply the conditional formatting.
Now, Cell A1 will turn green if the content of Cell B1 is "paid." You can adjust the formatting and the formula as needed for your specific requirements.