Hi there everybody.
Here is the situation.
I have a spreadsheet that in particular cells I have assigned a Formula via VBA coding. I managed to have the sheet calculated every sec, so the value of those cells changes every sec.
Now my problem is this.
I want to Conditional Format those cells (which are in Number Format) to a Custom Format I made (no font or color formatting, its a custom Date/Time format of type "ss \s","mm \m ss \s" etc). I need this to be done via VBA code because those cells get deleted and reassigned due to user updating procedure.
When I tried to record my actions, I got a macro with "ExecuteExcel4Macro" in it, which of course doesn't work when trying running the macro.
This is the macro Excel recorded:
Range("C11:D22").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=0,007" Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
ExecuteExcel4Macro "(2,1,"" ss s"")"
Selection.FormatConditions(1).StopIfTrue = True
Does anybody has an idea how to solve this? I googled the entire Internet and found nothing helpful.
Here is the situation.
I have a spreadsheet that in particular cells I have assigned a Formula via VBA coding. I managed to have the sheet calculated every sec, so the value of those cells changes every sec.
Now my problem is this.
I want to Conditional Format those cells (which are in Number Format) to a Custom Format I made (no font or color formatting, its a custom Date/Time format of type "ss \s","mm \m ss \s" etc). I need this to be done via VBA code because those cells get deleted and reassigned due to user updating procedure.
When I tried to record my actions, I got a macro with "ExecuteExcel4Macro" in it, which of course doesn't work when trying running the macro.
This is the macro Excel recorded:
Range("C11:D22").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=0,007" Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
ExecuteExcel4Macro "(2,1,"" ss s"")"
Selection.FormatConditions(1).StopIfTrue = True
Does anybody has an idea how to solve this? I googled the entire Internet and found nothing helpful.
Last edited: