Conditional Formatting degree's w/Tolerance

AFoxExcel

New Member
Joined
Dec 9, 2020
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
Hey all first time posting.

I am working on a document, and need to be able to conditional format numbers, and degree's, along with a +/- tolerance. I was able to get the regular numbers to work, but the fomratting does not seem to work when the degree symbol is added.

Any suggestions on how to get conditional formatting for degree numbers?

The formula I am using current is the first image below:

1607541579708.png


This is an example of what the sheet looks like:
1607541436882.png



Any help would be appreciated.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
المصنف1
BCDEFGHIJKLMNOP
1normal Dimension÷Tolerance-TolerancePart1Part2Part3Part4Part5Part1Part2Part3Part4Part5
290˚91˚90˚89˚91˚91˚91˚92˚89˚91˚91˚
31.0001.0101.0101.0101.0201.0101.0301.0101.0101.0201.0101.0301.010
ورقة1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
K2Expression=NUMBERVALUE(SUBSTITUTE($K$2,"˚",""))>91textNO
E2Expression=NUMBERVALUE(SUBSTITUTE($E$2,"˚",""))>91textNO
D2Expression=NUMBERVALUE(SUBSTITUTE($C$2,"˚",""))>91textNO
B2Expression=NUMBERVALUE(SUBSTITUTE($A$2,"˚",""))>91textNO
C2Expression=NUMBERVALUE(SUBSTITUTE($B$2,"˚",""))>91textNO
H2Expression=NUMBERVALUE(SUBSTITUTE($H$2,"˚",""))>91textNO
I2Expression=NUMBERVALUE(SUBSTITUTE($I$2,"˚",""))>91textNO
J2Expression=NUMBERVALUE(SUBSTITUTE($J$2,"˚",""))>91textNO
F2Expression=NUMBERVALUE(SUBSTITUTE($F$2,"˚",""))>91textNO
G2Expression=NUMBERVALUE(SUBSTITUTE($G$2,"˚",""))>91textNO
N2Expression=NUMBERVALUE(SUBSTITUTE($N$2,"˚",""))>91textNO
O2Expression=NUMBERVALUE(SUBSTITUTE($O$2,"˚",""))>91textNO
P2Expression=NUMBERVALUE(SUBSTITUTE($P$2,"˚",""))>91textNO
L2Expression=NUMBERVALUE(SUBSTITUTE($L$2,"˚",""))>91textNO
M2Expression=NUMBERVALUE(SUBSTITUTE($M$2,"˚",""))>91textNO
 
Upvote 0
Thank you for the reply @Dossfm0q, unfortunately this is not giving me exactly what I'm looking for. There will be instances when the "91" will change, so that value needs to be targeting column B (B2 in your example), and then consider the Tolerances which also can vary (Columns C2 & D2). There is also many more rows that will/could be filled in, so writing this formula out for each and every row will not be feasible.

Is there a way to modify my current conditional format to accommodate the degree symbol. I am assuming the symbol is what is throwing the formula off.
 
Upvote 0
hi
1-delete degree symbol
2 apply vba below
VBA Code:
Sub NumberFormat()
    Range("A2:O2").NumberFormat = "##" & ChrW(730)
End Sub
المصنف1
ABCDEFGHIJKLMNO
1normal Dimension÷Tolerance-TolerancePart1Part2Part3Part4Part5Part1Part2Part3Part4Part5
290˚91˚90˚89˚91˚91˚91˚92˚89˚91˚91˚
311.011.011.011.021.011.031.011.011.021.011.031.01
condtio
 
Last edited:
Upvote 0
It can be done, but it depends on what character you are using as the degree sign.
If you point this at a cell with the degree symbol, what does it say
Excel Formula:
=UNICODE(RIGHT(B2))
 
Upvote 0
It can be done, but it depends on what character you are using as the degree sign.
If you point this at a cell with the degree symbol, what does it say
Excel Formula:
=UNICODE(RIGHT(B2))
@Fluff, I get a number returned - 176
 
Upvote 0
Ok, you could use
Excel Formula:
=SUBSTITUTE($B2,CHAR(176),"")+SUBSTITUTE($C2,CHAR(176),"")
=SUBSTITUTE($B2,CHAR(176),"")-ABS(SUBSTITUTE($D2,CHAR(176),""))
 
Upvote 0
Ok, you could use
Excel Formula:
=SUBSTITUTE($B2,CHAR(176),"")+SUBSTITUTE($C2,CHAR(176),"")
=SUBSTITUTE($B2,CHAR(176),"")-ABS(SUBSTITUTE($D2,CHAR(176),""))
@Fluff , I used your supplied formula's, and converted the numbers to my actual cells. It ended up turning all the numbers red, even the ones that would be within the tolerance limits. See screenshot below.

Thoughts on why it would do that?

If I understand your formula correctly, you are just accommodating for the character.

1607606276153.png


Here is the conditional format setup I am using and then a confirmation that the formulas are input correctly
1607606442317.png


1st formula
1607606523558.png


2nd formula
1607606559349.png
 
Upvote 0
Ok assuming that G24 is the 1st cell in the applies, Use a formula & use this
Excel Formula:
=AND(G24<>"",OR(SUBSTITUTE(G24,CHAR(176),"")+0>SUBSTITUTE($B24,CHAR(176),"")+SUBSTITUTE($C24,CHAR(176),""),SUBSTITUTE(G24,CHAR(176),"")+0<SUBSTITUTE($B24,CHAR(176),"")-ABS(SUBSTITUTE($D24,CHAR(176),""))))

+Fluff v2.xlsm
BCDEFGHIJ
2490°88°89°92°91°
2510.010.011.0210.990.98
Master
Cells with Conditional Formatting
CellConditionCell FormatStop If True
G24:O25Expression=AND(G24<>"",OR(SUBSTITUTE(G24,CHAR(176),"")+0>SUBSTITUTE($B24,CHAR(176),"")+SUBSTITUTE($C24,CHAR(176),""),SUBSTITUTE(G24,CHAR(176),"")+0<SUBSTITUTE($B24,CHAR(176),"")-ABS(SUBSTITUTE($D24,CHAR(176),""))))textNO
 
Upvote 0
@Fluff, I really really appreciate the time and effort you are putting into this, I wish I understood excel better to work through this myself!

I am still getting some errors in what is being returned, screenshot below is showing a couple test that I tried using your formula. You can see there are some inconsistencies.

1607609138917.png


Formatting
1607609197756.png


Formula being used
=AND(G24<>"",OR(SUBSTITUTE(G24,CHAR(176),"")+0>SUBSTITUTE($B24,CHAR(176),"")+SUBSTITUTE($C24,CHAR(176),""),SUBSTITUTE(A24,CHAR(176),"")+0<SUBSTITUTE($B24,CHAR(176),"")-ABS(SUBSTITUTE($D24,CHAR(176),""))))
 
Upvote 0

Forum statistics

Threads
1,215,471
Messages
6,125,000
Members
449,202
Latest member
Pertotal

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