Conditional formatting a MID formula

Cliffork

New Member
Joined
Feb 12, 2020
Messages
43
Office Version
  1. 365
Hello,

I have the range shown below on a worksheet I fill in for individual instruments I am calibrating. The far right cell pulls data directly from a device, and all the cells left of it use MID functions to pull the reading from the individual sensors. I need to make a conditional formatting formula for the CO and H2S cts to be green if the value is between 32700-32800 and red otherwise. Obviously this is a very simple set of formulas to make normally, but because it's using a MID function it doesn't seem to want to perform any conditional formatting on them. Any suggestions for what I'm doing wrong here?
New HCH Compilation File.xlsm
ABCIJKLMNO
34CH4 %CO2 %O2 CountsCO ctsH2S ctsH2 cts
3699.99 N2 Reading 0.000.00002132458327400832292608242 M + C - 04324 02447 05887 02456 02423 01349 03494 04034 06978 00000 08172 03196 00021 0.00 0.00 32458 32740 08322926
Initial Cal
Cell Formulas
RangeFormula
I36I36=MID(O36,98,5)
J36J36=MID(O36,107,5)
K36K36=MID(O36,93,4)
L36L36=MID(O36,116,5)
M36M36=MID(O36,122,5)
N36N36=MID(O36,128,8)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
L36:M36Cell Valuebetween 32700 and 32800textNO
L36:M36Cellcontains a blank value textNO
L36:M36Cell Value<32700textNO
L36:M36Cell Value>32800textNO
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I think the MID (and Left and Right) functions output as text values. Try:
Excel Formula:
=--MID(O36,98,5)
 
Upvote 0
Solution
Looks like that works! What does the -- do? Change the formatting output to numbers?
Yep, exactly. MID is a text function that returns a text result.
The "--" coerces the text to a number. You could just as easily multiply by 1 or add 0 to coerce it to a number.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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