Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings I have the following VBA, I need another component to show if there is nothing or a blank cells there will be nothing added. The formula below is still adding 0000 to an empty cell.
VBA Code:
Sub twenty_four_hour_Clock()
With Range("D1", Range("D" & Rows.Count).End(xlUp))
x = .Address
.Value = Evaluate("if(len(" & x & ")=3,""0""&" & x & "," & x & ")")
.Value = Evaluate("if(len(" & x & ")=2,""00""&" & x & "," & x & ")")
.Value = Evaluate("if(len(" & x & ")=1,""000""&" & x & "," & x & ")")
End With
End Sub