Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All:
I am conditional formatting a userform label based on whether a calculated value is greater than a number assigned to a State. The assigned number is retrieved in a vlookup. Green if lLastScoreCutLine, red if false. Named Range lLastScore is the calculated field and Named Range Cutline is the State value. Unfortunately the rest of the code is too long for me too post so it will not work if you cut and paste. Me.lCutLine.Caption = ThisWorkbook.Worksheets("Input Form").Range("CutLine").Text Me.lLastScore.Caption = ThisWorkbook.Worksheets("Prioritization Output").Range("Score").Text If Me.lLastScore.Caption Me.lCutLine.Caption Then Me.lLastScore.ForeColor = &HC000& Else Me.lLastScore.ForeColor = &HFF& End If If Me.lLastScore.Caption Me.lCutLine.Caption Then Me.Label61.ForeColor = &HC000& Else Me.Label61.ForeColor = &HFF& End If The code does not throw an error, but it is inconsistent. It works for Colorado, but not for Texas and New Mexico. I have double checked lookup table formatting and they table is consistent all #.00 number. They evaluate at: CutLine (Colorado)="1.94" CutLine (Texas)="3.65" lLastScore="12.2" or "1.1" or "3.9" or "100.6" The quotes indicate they are coming in as strings. Can I bring them in as numeric values? The .Value property does not work. Thanks. This has me stumped....... James |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using cell reference with logical operator in DGET expression | Excel Worksheet Functions | |||
Change Boolean / Logical Operator using Input Cell | Excel Worksheet Functions | |||
Logical operator in Calculated Field Formula | Excel Discussion (Misc queries) | |||
LOGICAL OPERATOR "IF" FOR AN ARRAY | Excel Discussion (Misc queries) | |||
Excel logical operator for a cell if another cell has a certain co | Excel Programming |