Jump to content

Conditional formatting not working

Go to solution Solved by Avocado Diaboli,

First off, you're sitting at a computer. Take screenshots, not pictures of your monitor. Between the blur and the Moiré pattern, it's unnecessarily hard to figure out what I'm looking at.

 

Second, why are you recalculating the values here when you already have cells that have these values? I mean here, the top formula is just the same as the value of N9 and the bottom one is the same as the value of N7. Just refer to the those values directly instead of typing the same calculactions into every conditional format

image.png.11d97ea46fa11025d5322bde7f03962c.png

 

Lastly, you need to use absolute cell references. By default, if you refer to a cell by its address, all other cells in the range that format applies to use that as a relative starting point. So let's say if you want to format the cells from A1:A5. We want to color them based on a value in B1, but we only use a relative cell reference. So cell A1 looks at the content of B1 and formats itself accordingly. A2 doesn't look at B1, it looks at B2, because by default the cell reference is relative to the cell you want to format. To Sheets, it looks like you gave it the following order for A1: "Look at the cell next to you on the right and check what value it has." So when it's A2's turn, it looks at B2, A3 looks at B3, etc. because those are the cells right next to them.

 

To use absolute cell references, you need to type in the cell name like this $B$1. The $-sign in front of each element says that you want to make sure it only looks at what you specify. So for example if you use $B1, it means that it only looks at column B, but it can be on any row on that column. B$1 means that it only looks at row 1, but it can be in any column on that row. $B$1 means that only that single cell is used for the calculation, regardless of what the target range is. So in your case, it should look something like this:

 

image.png.51e8fe23dd7bcbfca96370b4db5baec1.png

 

As you can see, I'm using the values calculated in column N directly in the calculation, not doing the same calculation again and again for each format.

 

image.png.f1b8c3bc474ba4e77bbc9943c3c2f576.png

Hey guys, trying to set up a spreadsheet with conditional formatting, but Sheets is doing something very strange.

When I set up formatting on a single cell, with just a numerical value, it seems to work perfectly. But when I apply it to the cells that are the end of a formula: it behaves one of two ways: it either randomly applies the formatting or applies none of it at all.

(The last number set in the list should format as red)

Is there something I am not understanding about how conditional formatting is applied?

20230907_212138.jpg

20230907_212011.jpg

20230907_211949.jpg

20230907_211929.jpg

20230907_211907.jpg

20230907_211821.jpg

Link to comment
https://linustechtips.com/topic/1530384-conditional-formatting-not-working/
Share on other sites

Link to post
Share on other sites

First off, you're sitting at a computer. Take screenshots, not pictures of your monitor. Between the blur and the Moiré pattern, it's unnecessarily hard to figure out what I'm looking at.

 

Second, why are you recalculating the values here when you already have cells that have these values? I mean here, the top formula is just the same as the value of N9 and the bottom one is the same as the value of N7. Just refer to the those values directly instead of typing the same calculactions into every conditional format

image.png.11d97ea46fa11025d5322bde7f03962c.png

 

Lastly, you need to use absolute cell references. By default, if you refer to a cell by its address, all other cells in the range that format applies to use that as a relative starting point. So let's say if you want to format the cells from A1:A5. We want to color them based on a value in B1, but we only use a relative cell reference. So cell A1 looks at the content of B1 and formats itself accordingly. A2 doesn't look at B1, it looks at B2, because by default the cell reference is relative to the cell you want to format. To Sheets, it looks like you gave it the following order for A1: "Look at the cell next to you on the right and check what value it has." So when it's A2's turn, it looks at B2, A3 looks at B3, etc. because those are the cells right next to them.

 

To use absolute cell references, you need to type in the cell name like this $B$1. The $-sign in front of each element says that you want to make sure it only looks at what you specify. So for example if you use $B1, it means that it only looks at column B, but it can be on any row on that column. B$1 means that it only looks at row 1, but it can be in any column on that row. $B$1 means that only that single cell is used for the calculation, regardless of what the target range is. So in your case, it should look something like this:

 

image.png.51e8fe23dd7bcbfca96370b4db5baec1.png

 

As you can see, I'm using the values calculated in column N directly in the calculation, not doing the same calculation again and again for each format.

 

image.png.f1b8c3bc474ba4e77bbc9943c3c2f576.png

And now a word from our sponsor: 💩

ℑ𝔣 𝔶𝔬𝔲 𝔬𝔫𝔩𝔶 𝔫𝔬𝔱𝔦𝔠𝔢 𝔭𝔢𝔯𝔣𝔬𝔯𝔪𝔞𝔫𝔠𝔢 𝔭𝔯𝔬𝔟𝔩𝔢𝔪𝔰 𝔴𝔥𝔢𝔫 𝔶𝔬𝔲 𝔥𝔞𝔳𝔢 𝔞 𝔰𝔱𝔞𝔱 𝔠𝔬𝔲𝔫𝔱𝔢𝔯 𝔬𝔳𝔢𝔯𝔩𝔞𝔶 𝔞𝔠𝔱𝔦𝔳𝔢, 𝔶𝔬𝔲 𝔞𝔯𝔢 𝔪𝔢𝔯𝔢𝔩𝔶 𝔩𝔬𝔬𝔨𝔦𝔫𝔤 𝔣𝔬𝔯 𝔭𝔯𝔬𝔟𝔩𝔢𝔪𝔰 𝔱𝔬 𝔟𝔢 𝔲𝔭𝔰𝔢𝔱 𝔬𝔳𝔢𝔯. 𝔗𝔲𝔯𝔫 𝔬𝔣𝔣 𝔱𝔥𝔢 𝔠𝔬𝔲𝔫𝔱𝔢𝔯 𝔟𝔢𝔣𝔬𝔯𝔢 𝔞𝔰𝔨𝔦𝔫𝔤 𝔣𝔬𝔯 𝔥𝔢𝔩𝔭 𝔞𝔫𝔡 𝔰𝔢𝔢 𝔦𝔣 𝔶𝔬𝔲 𝔰𝔱𝔦𝔩𝔩 𝔫𝔬𝔱𝔦𝔠𝔢.

-.-. --- --- .-.. --..-- / -.-- --- ..- / -.- -. --- .-- / -- --- .-. ... . / -.-. --- -.. .

ᑐᑌᑐᑢ

Spoiler

    ▄██████                                                      ▄██▀

  ▄█▀   ███                                                      ██

▄██     ███                                                      ██

███   ▄████  ▄█▀  ▀██▄    ▄████▄     ▄████▄     ▄████▄     ▄████▄██   ▄████▄

███████████ ███     ███ ▄██▀ ▀███▄ ▄██▀ ▀███▄ ▄██▀ ▀███▄ ▄██▀ ▀████ ▄██▀ ▀███▄

████▀   ███ ▀██▄   ▄██▀ ███    ███ ███        ███    ███ ███    ███ ███    ███

 ██▄    ███ ▄ ▀██▄██▀    ███▄ ▄██   ███▄ ▄██   ███▄ ▄███  ███▄ ▄███▄ ███▄ ▄██

  ▀█▄    ▀█ ██▄ ▀█▀     ▄ ▀████▀     ▀████▀     ▀████▀▀██▄ ▀████▀▀██▄ ▀████▀

       ▄█ ▄▄      ▄█▄  █▀            █▄                   ▄██  ▄▀

       ▀  ██      ███                ██                    ▄█

          ██      ███   ▄   ▄████▄   ██▄████▄     ▄████▄   ██   ▄

          ██      ███ ▄██ ▄██▀ ▀███▄ ███▀ ▀███▄ ▄██▀ ▀███▄ ██ ▄██

          ██     ███▀  ▄█ ███    ███ ███    ███ ███    ███ ██  ▄█

        █▄██  ▄▄██▀    ██  ███▄ ▄███▄ ███▄ ▄██   ███▄ ▄██  ██  ██

        ▀███████▀    ▄████▄ ▀████▀▀██▄ ▀████▀     ▀████▀ ▄█████████▄

 

Link to post
Share on other sites

11 hours ago, Avocado Diaboli said:

First off, you're sitting at a computer. Take screenshots, not pictures of your monitor. Between the blur and the Moiré pattern, it's unnecessarily hard to figure out what I'm looking at.

My bad, will do better. Was beyond frustrated at the time.

 

11 hours ago, Avocado Diaboli said:

Second, why are you recalculating the values here when you already have cells that have these values? I mean here, the top formula is just the same as the value of N9 and the bottom one is the same as the value of N7. Just refer to the those values directly instead of typing the same calculactions into every conditional format

That was a last ditch effort, I'd found some amount of success with full formulas instead of referencing just the cell

 

11 hours ago, Avocado Diaboli said:

To use absolute cell references, you need to type in the cell name like this $B$1. The $-sign in front of each element says that you want to make sure it only looks at what you specify. So for example if you use $B1, it means that it only looks at column B, but it can be on any row on that column. B$1 means that it only looks at row 1, but it can be in any column on that row. $B$1 means that only that single cell is used for the calculation, regardless of what the target range is. So in your case, it should look something like this:

The absolute references have been the bane of my existence in troubleshooting. Would've thought it would occur to me by now, but I guess it still hasn't caught on with me.

Many thanks.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×