ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change the color of a cell or text with an if statement (https://www.excelbanter.com/excel-discussion-misc-queries/157460-change-color-cell-text-if-statement.html)

Oddcarout

Change the color of a cell or text with an if statement
 
I have an if statement and if the answer is false I want the to be RED.

Thanks

bj

Change the color of a cell or text with an if statement
 
use conditional formating Fomat-conditonal formatting equation is (your
formula) and format as wanted

"Oddcarout" wrote:

I have an if statement and if the answer is false I want the to be RED.

Thanks


Oddcarout

Change the color of a cell or text with an if statement
 
=IF(D6="Yes", "Complete", IF(F6=$B$1, "Current", "Past Due"))

I want it to be red if "Past Due"

for the conditional I have Formula is ="Past Due"

but that does not work.

thanks

RagDyeR

Change the color of a cell or text with an if statement
 
You have to add the address of the cell that contains the formula.

If your original formula is in A1, and A1 is what you're looking to turn
red, then select A1 when creating your CF, and your *conditional* formula
should be:

=A1="Past Due"
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Oddcarout" wrote in message
...
=IF(D6="Yes", "Complete", IF(F6=$B$1, "Current", "Past Due"))

I want it to be red if "Past Due"

for the conditional I have Formula is ="Past Due"

but that does not work.

thanks




Duke Carey

Change the color of a cell or text with an if statement
 
use formula is =F6<$B$1

It's the same condition that causes the IF() formula to return Past Due

"Oddcarout" wrote:

=IF(D6="Yes", "Complete", IF(F6=$B$1, "Current", "Past Due"))

I want it to be red if "Past Due"

for the conditional I have Formula is ="Past Due"

but that does not work.

thanks


Oddcarout

Change the color of a cell or text with an if statement
 
redid my formula
=IF($B$1<F6,"Current",IF($B$1-7F6,"7 Days Past Due", IF($B$1F6,"Past
Due",unknown)))

I have added the 7 days past due, I would like to use two different colors,
one for past due and one for 7 days past due.

Thanks

Oddcarout

Change the color of a cell or text with an if statement
 

Also is there a way to make more than one cell formated. I would like the
whole line to become red.

Oddcarout

Change the color of a cell or text with an if statement
 
I am using

=$B$1-7<F6<$B$1 (yellow) but it is not working.
I also have:
=F6<$B$1 that is working (red)

bj

Change the color of a cell or text with an if statement
 
in the conditional formatting window
click add to get new options
you can have up to three
use the <7 days as the first and past due as the second
it will do the first conditional format it meets.

select the entire row and put as condiotn 1 the formula is =$f6<$B$1-7
format as red
condition 2 the formula is =$f6<$B$1 format other yellow
Assuming f6 is the due date and b1 is todays date.

"Oddcarout" wrote:

I am using

=$B$1-7<F6<$B$1 (yellow) but it is not working.
I also have:
=F6<$B$1 that is working (red)


Duke Carey

Change the color of a cell or text with an if statement
 
First condition (7 days past due)

=And($B$1$F6,$B$1<=($F6+7)) - format yellow

Second condition

=$B$1($F6+7) - format red

To make the whole row turn red (or yellow), select all the cells in the row
you want to be formatted this way AND THEN do the conditional formatting



"Oddcarout" wrote:

redid my formula
=IF($B$1<F6,"Current",IF($B$1-7F6,"7 Days Past Due", IF($B$1F6,"Past
Due",unknown)))

I have added the 7 days past due, I would like to use two different colors,
one for past due and one for 7 days past due.

Thanks


Oddcarout

Change the color of a cell or text with an if statement
 
Thanks,


All times are GMT +1. The time now is 07:45 PM.

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