Forum Discussion
Conditional formating with multiple values (including null)
Hello, I am hoping someone will be able to give me some pointers.
The circled area on right of spreadsheet is where my data sits, the coloured columns on the left are reference criteria. I am trying to highlight exceedances in my data with the colour of the criteria that it exceeds (data is analysis of bore-water, there are several hundred chemicals/elements which are screened for in each sample. Not all of the chemicals screened for have reference criteria).
The main complicating factor is that lots of the reference criteria is blank. I don't want to highlight data where there isn't a reference criteria, which means that a simple "greater than" formula doesn't work (all of my measured data will be greater than zero, which would give a lot of "false positives" where there is no reference criteria).
Is there a way to create conditional formatting that will achieve this? I can make multiple conditional formatting rules to highlight exceedances, however I can't for the life of me figure out how to make it work with NULL values in some places in the reference data.
I manually coloured some example data in row 17 to show how I wish the formatting to display.
PS. there are several hundred rows of data .
Thanks for your help.
Hi,
I can see you might be familiar with conditional formatting, so I'll just keep it simple. Try using this in the conditional formatting formula:
=AND(NOT(ISBLANK(A1)),E1>=A1)
Whenever your data is equal or greater than your reference and the reference is not blank, then the cell will be coloured. Please remove the equal sign if you want to make it strictly greater. Adjust the ranges accordingly too. Make sure to set the correct fill color for each range of cells and you seem to be good to go!
- Martin_AngostoIron Contributor
Hi,
I can see you might be familiar with conditional formatting, so I'll just keep it simple. Try using this in the conditional formatting formula:
=AND(NOT(ISBLANK(A1)),E1>=A1)
Whenever your data is equal or greater than your reference and the reference is not blank, then the cell will be coloured. Please remove the equal sign if you want to make it strictly greater. Adjust the ranges accordingly too. Make sure to set the correct fill color for each range of cells and you seem to be good to go!
- johedwards1Copper ContributorThat works perfectly! thank you so much!