Conditional Formatting based on Column header and value

markdwalls

New Member
Joined
May 15, 2018
Messages
23
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am currently working on a sheet where cells need to be highlighted when the header of the table is "x" and also if the cell is between two numbers. What kind of formula could i use for this?

Screenshot down below is what i'm working with. So for example, if the cells in the LH Top (mm) column are less than 100 then format. But for LH Upper (mm) i need it to be less than 50.

1601463268078.png


Thanks in advance!

Mark
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I am not sure that your question is 100% clear.
Your example has no data at all in the "LH Top" and "LH Upper" columns.
Can you show us an example with data in it that would meet your conditions, and let us know exactly what should be Conditional Formatted (the whole row? just certain cells?).
 
Upvote 0
Thank you for your reply.

Below is what the data should look like. So basically each heading has different formatting criteria. So RH Lower is yellow if between 50 and 100, blue if between 0 and 50. With RH Bottom its yellow if between 25 and 50, and blue if between 0 and 25. Any cells that have a negative values will show red and i have already done that one. Cells will not be formatted at all if they don't meet any of the criteria like with the 141 shown below. It all depends on what the heading says basically. So the formula would have to be if the heading is x and also the number is between y and z then follow format.

Hope this helps. Apologies if my explanation is poor.

1601476769660.png


Mark
 
Upvote 0
You can set multiple conditional formatting rules for each column.

For example, for your LH Lower column, you want to select the whole column, and then create Conditional Formatting rules, using the Formula option (the last one).

So, for this:
RH Lower is yellow if between 50 and 100
let's say that is column F. Then select all of column F and enter this CF formula:
=AND($F1>50,$F1<100)
and then choose the yellow fill option.

Then you would apply a second rule to the same range that looks like this:
=AND($F1>0,$F1<50)
and then choose the blue fill option.

Repeat the same for the third rule, then move on to the next column, and repeat the same process.

Note that you weren't too clear in your explanation when it shows be "less than/greater than" versus "less than or equal to/greater than or equal to".
So you may need to change some of your ">" to ">=" and "<" to "<=".
I will leave that to you, because only you know how you want that to work.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,488
Members
448,967
Latest member
visheshkotha

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