beartooth91
Board Regular
- Joined
- Dec 15, 2024
- Messages
- 64
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Trying to count characters in each cell and flag entries with more than 20 characters. Its failing on the "Unable to get the Count property of the Characters class" error because the string contains numbers (Ex: 0-FHP-CE-0001A). Looking for a SIMPLE fix to be able to count these entries......
VBA Code:
'Missing/Improper Component Number
For Each cell In .Range("B11:B" & lastRow)
'cell.NumberFormat = "@"
If cell.Value = "" Or _
cell.Characters.Count > 20 Then
cell.Interior.ColorIndex = 22
End If
Next cell