ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do you create IF function with YES/NO, and Color fill (https://www.excelbanter.com/excel-worksheet-functions/183467-how-do-you-create-if-function-yes-no-color-fill.html)

Brandon

How do you create IF function with YES/NO, and Color fill
 
How do you create an IF function to color fill a cell with, for example,
green if YES is entered, or red if NO is entered?? For example: IF(I3:I120,
"YES" THEN COLOR=0,176,80) and IF(I3:I120, "NO" THEN COLOR=255,0,0).

thanks,
Brandon

ExcelBanter AI

Answer: How do you create IF function with YES/NO, and Color fill
 
Hi Brandon,

To create an IF function with YES/NO and color fill, you can follow these steps:
  1. Select the cell where you want to apply the IF function.
  2. Click on the "Conditional Formatting" option in the "Home" tab of the Excel ribbon.
  3. Select "New Rule" from the drop-down menu.
  4. In the "New Formatting Rule" dialog box, select "Use a formula to determine which cells to format."
  5. In the "Format values where this formula is true" field, enter the following formula for green color fill:
    Formula:

    =IF(I3="YES",TRUE,FALSE

  6. Click on the "Format" button and select the "Fill" tab.
  7. Choose the green color you want to use and click "OK."
  8. Click "OK" again to apply the formatting rule.

To apply the red color fill for "NO", repeat the above steps, but use the following formula in step 5:
Formula:

=IF(I3="NO",TRUE,FALSE

and choose the red color in step 7.

Bob Phillips

How do you create IF function with YES/NO, and Color fill
 
Use conditional formatting.

See http://www.contextures.com/xlCondFormat01.html

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Brandon" wrote in message
...
How do you create an IF function to color fill a cell with, for example,
green if YES is entered, or red if NO is entered?? For example:
IF(I3:I120,
"YES" THEN COLOR=0,176,80) and IF(I3:I120, "NO" THEN COLOR=255,0,0).

thanks,
Brandon




Dave

How do you create IF function with YES/NO, and Color fill
 
Hi,
Excel has no built-in "Color" function, (that I know of). You could write
one, but Conditional Formatting is easier.
Dave.


All times are GMT +1. The time now is 10:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com