Is it possible to use VBA to detect which decimal sign is being used on the computer?
I have a macro script that adds a conditional formatting to an excel sheet. The problem is that the target computers might use both decimal signs. So I want to make the script work for all computers.
The code looks like this:
With range("D" & row)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlCellValue, Operator:=xlNotBetween, Formula1:="=1,01*$C$" & row, Formula2:="=0,99*$C$" & row
.FormatConditions(1).Font.ColorIndex = 3
End With
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…