Edgarvelez
Board Regular
- Joined
- Jun 6, 2019
- Messages
- 197
- Office Version
- 2016
- Platform
- Windows
Hi All,
Tried to record a conditional format but it's not working.
In cell C11 I have a drop down and when I select LB. I want to change the number format to #,##0.00 on range D21:E1048576
***************************************************
This the recorded code that does not work
Range("D21:E1048576").Select
Selection.NumberFormat = "#,##0.00"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$C$11=""LB."""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
ExecuteExcel4Macro "(2,1,""#,##0.00"")"
Selection.FormatConditions(1).StopIfTrue = False
***************************************************
I added a screen shot to simplify the goal I and trying to get.
Tried to record a conditional format but it's not working.
In cell C11 I have a drop down and when I select LB. I want to change the number format to #,##0.00 on range D21:E1048576
***************************************************
This the recorded code that does not work
Range("D21:E1048576").Select
Selection.NumberFormat = "#,##0.00"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=$C$11=""LB."""
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
ExecuteExcel4Macro "(2,1,""#,##0.00"")"
Selection.FormatConditions(1).StopIfTrue = False
***************************************************
I added a screen shot to simplify the goal I and trying to get.