Using rules to color going wrong

lu1zuk

New Member
Joined
Jul 30, 2021
Messages
33
Office Version
  1. 2019
Platform
  1. Windows
Sobe e Desce 2.0.xlsx
F
2Tempo
37
47
57
67
77
87
97
107
116
126
136
146
156
165
175
185
195
205
215
224
234
244
254
264
274
284
Principal
Cell Formulas
RangeFormula
F3:F28F3=SUBSTITUTE(E3,"H","")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F:FCell Value<24textNO
F:FCell Value>30textNO
F:FCell Valuebetween 25 and 29textNO


Trying to use rules to color this part, but if im using this formula "substitute" it show that they are cell>30 and paint in green, if its a value without the substitute its works fine, how to correct this?
The substitute things is because i have this
Sobe e Desce 2.0.xlsx
ABDF
3??́ moranguinho7616510703756902617 Horas 32 Minutos 3 Segundos892270088286273586, 901201926312566845, 923766741597835284, 869353363677020214, 941733727610998804, 945790336070983750, 869353363815411758, 869353363815411754, 869353363635073068, 869353363647651884, 869353363807010852, 869353363635073070, 869353363677020217, 879515744549863484, 970519691330216006, 869353363794444395, 869353363677020210, 879479406039531562, 869353363668598801, 869353363668598798, 869353363677020212, 8693533636098990387
4calango7497810544240886277 Horas 28 Minutos 37 Segundos892270088286273586, 869353363714744338, 869353363677020215, 869353363609899042, 869353363635073066, 869353363861536791, 869353363807010852, 869353363832180801, 869353363815411753, 869353363677020210, 869353363677020212, 8693533636098990387
5Miojinha8596193514059203077 Horas 26 Minutos 16 Segundos892270088286273586, 970862133929730138, 869353363886710784, 940077814516953088, 869353363861536797, 869353363677020214, 869353363815411754, 869353363807010852, 869353363886710786, 869353363886710789, 869353363832180800, 973716553935769620, 8693533636098990387
Principal
Cell Formulas
RangeFormula
F3:F5F3=SUBSTITUTE(E3,"H","")
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F:FCell Value<=24textNO
F:FCell Value>=30textNO
F:FCell Valuebetween 25 and 29textNO


And on this, when its get the 3 first contents sometimes it gets the H, and i don't know how to get rid of the H without the substitute formule
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
The result of your formula will be text.
If you coerce it to a number, it should work.

Try this:
Excel Formula:
=SUBSTITUTE(E3,"H","")+0
 
Upvote 0
Solution
What's in column E?

It looks like your column F is not numeric but numbers stored as text. Your conditional formatting rules are based on numbers.

Change your formula in cell F3 to =--SUBSTITUTE(E3,"H","") and the result will be a number. Then your conditional formatting should work.
 
Upvote 0
The result of your formula will be text.
If you coerce it to a number, it should work.

Try this:
Excel Formula:
=SUBSTITUTE(E3,"H","")+0
Thank you, it worked fine, and i understand why!
What's in column E?

It looks like your column F is not numeric but numbers stored as text. Your conditional formatting rules are based on numbers.

Change your formula in cell F3 to =--SUBSTITUTE(E3,"H","") and the result will be a number. Then your conditional formatting should work.
Thank you too! it worked too, but i don't understand what " -- " do, i will search what its function on web
 
Upvote 0
Thank you too! it worked too, but i don't understand what " -- " do, i will search what its function on web
It is just a different way of coercing it to a number.
There are various ways of doing it. You could add zero like I did, multiply by 1, or do -- (which is just a double-negative sign).
 
Upvote 0
It is just a different way of coercing it to a number.
There are various ways of doing it. You could add zero like I did, multiply by 1, or do -- (which is just a double-negative sign).
Thank you for the explanation!
 
Upvote 0
You are welcome.
Glad we were able to help!
 
Upvote 0
It is just a different way of coercing it to a number.
There are various ways of doing it. You could add zero like I did, multiply by 1, or do -- (which is just a double-negative sign).
I used to use +0 because it made sense, until someone told me that the double negative was somehow faster or computationally more efficient.
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,987
Members
452,373
Latest member
TimReeks

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