Dr. Demento
Well-known Member
- Joined
- Nov 2, 2010
- Messages
- 609
- Office Version
-
- 2019
- 2016
- Platform
-
- Windows
For the life of me, I cannot figure this out. When the cell at .Cells(i, col) has the value 0\1 (as text), my conditional statement that evaluates if str = "0/1" is FALSE. Likewise, str Like "0/*" is always FALSE for values like "0\9". What am I doing wrong?
Code:
' ~~ Format START/STOP cells for better visualization
col = tbl_Watchstop.ListColumns("Split counter").DataBodyRange.column
For i = 1 To tbl_Watchstop.ListRows.count + 1
str = .Cells(i, col).value
If str = "0/1" Then .Cells(i, col).Interior.Color = 6750156 ' ~~ Light green for START
If str Like "0/*" And str <> "0/1" Then .Cells(i, col).Interior.Color = 16764159 ' ~~ Light pink for STOP
Next i