Hi. I'm scrapping some conditional formatting.
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(NOT(ISBLANK($AG3)),LEN($AG3)>12,Colors_On=TRUE)"
Code works just fine until found a coworkers that uses international / French keyboard and I found that "," needs to be ";" to work on that system when adding formula by script.
So I don't have to have multiple version thinking something like below but not sure what would go into custom function "KeyBoardType()"
If Keyboardtype = "US" Then
' Use ,
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(NOT(ISBLANK($AG3)),LEN($AG3)>12,Colors_On=TRUE)"
Else
' Use ;
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(NOT(ISBLANK($AG3));LEN($AG3)>12,Colors_On=TRUE)"
End if
Help with a 'KeyBoardType()' function or any other implementation suggestions would be great.
Thanks for the help.
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(NOT(ISBLANK($AG3)),LEN($AG3)>12,Colors_On=TRUE)"
Code works just fine until found a coworkers that uses international / French keyboard and I found that "," needs to be ";" to work on that system when adding formula by script.
So I don't have to have multiple version thinking something like below but not sure what would go into custom function "KeyBoardType()"
If Keyboardtype = "US" Then
' Use ,
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(NOT(ISBLANK($AG3)),LEN($AG3)>12,Colors_On=TRUE)"
Else
' Use ;
Selection.FormatConditions.Add Type:=xlExpression, Formula1:="=AND(NOT(ISBLANK($AG3));LEN($AG3)>12,Colors_On=TRUE)"
End if
Help with a 'KeyBoardType()' function or any other implementation suggestions would be great.
Thanks for the help.