pdiddy9590
New Member
- Joined
- Mar 12, 2018
- Messages
- 5
Is there an easier way of highlighting cells that contain a special character (!~`@#$%^&*()_+-={}|:"<>?[]\;',./) instead of listing everyone separate like below? There can be letters and numbers along with the special characters.
If ActiveCell.Offset(0, 4).Value Like "*.*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*~*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*`*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*!*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*@*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*#*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*$*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*%*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*^*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*&*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*_*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
End If
example
<tbody>
</tbody>
If ActiveCell.Offset(0, 4).Value Like "*.*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*~*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*`*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*!*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*@*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*#*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*$*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*%*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*^*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*&*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
ElseIf ActiveCell.Offset(0, 4).Value Like "*_*" Then
ActiveCell.Offset(0, 4).Interior.ColorIndex = 6
End If
example
Paul* |
. |
? |
* |
H|l |
C/O Timmy & Assoc |
c/o |
H\o |
( |
] |
Smith!! |
Paul/II |
465 Estate of |
Bob-Robert |
<tbody>
</tbody>