Conditional formating

kojak43

Active Member
Joined
Feb 23, 2002
Messages
270
I thought this was working, but I guess not.
In cell N6 I placed the following under Conditional Formating. If cell value is equal to 1, make the cell red.
I also used a formula on cells A6, B6 and C6 that said formula =If($N6,1) Turn A6,B6 and C6 red as well.
I tested it using a 1 in N6 and it worked fine. If there is no number 1 in N6, none of the cells turn red. That is exactly what I want to happen.
However, I just changed N6 to a 2, and all the cells changed red. (A6:C6 + N6)
What am I doing wrong?
 
Are your words true because we are dealing with Conditional Formatting?
i.e. "=IF($N6=1,"Turn a certain cell Red") [ modified ' to "" ]

doesn't return a logical value when $N6=1, only does so when $N6<>1. Conditional Formatting expects a logical value (TRUE or FALSE). "

What if it were entered as an if function, outside of Conditional Formatting? If the value in N6 was a 1, the logical value should say TRUE. As you wrote previously: Condition --> Action1, Action2
Is the condition IF($N6=1,[TRUE] Then Make A Cell Red, [If it is False, make the cell Empty]"")

I know what you are saying is correct, because I changed my spreadsheet, and it works. I am not being argumentative, I am just having a hard time understanding.
 
Upvote 0

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

On 2002-04-09 15:26, kojak43 wrote:
Are your words true because we are dealing with Conditional Formatting?
i.e. "=IF($N6=1,"Turn a certain cell Red") [ modified ' to "" ]

doesn't return a logical value when $N6=1, only does so when $N6<>1. Conditional Formatting expects a logical value (TRUE or FALSE). "


Yep.

What if it were entered as an if function, outside of Conditional Formatting? If the value in N6 was a 1, the logical value should say TRUE. As you wrote previously: Condition --> Action1, Action2
Is the condition IF($N6=1,[TRUE] Then Make A Cell Red, [If it is False, make the cell Empty]"")


=IF($N6=1,"Make A Cell Red","")

put in a cell (outside Conditional Formatting), say in A1, this formula will produce/return the string "Make A Cell Red" in A1 whenever N6 contains 1 as value; The formula will compute a blank, i.e., "", whenever N6 houses a value other than 1. The crux is that

$N6=1

is the condition argument of IF. The condition must evaluate to TRUE for Action1 or must evaluate to FALSE for Action2.

I know what you are saying is correct, because I changed my spreadsheet, and it works. I am not being argumentative, I am just having a hard time understanding.

Don't worry: I don't take your questions as argumentative.

Aladin
 
Upvote 0
Thank you very much, Aladin for taking so much time to explain this to me.

I can see this stuff is not going to be easy.
It will be enjoyable, and with resources as yourself and others at Mr Excel, I might be able to get by without pulling out my hair.
Oh, too late!
Kojak.
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,054
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top