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
[TABLE="width: 182"]
<tbody>[TR]
[TD]Paul*
[/TD]
[/TR]
[TR]
[TD].
[/TD]
[/TR]
[TR]
[TD]?
[/TD]
[/TR]
[TR]
[TD]*
[/TD]
[/TR]
[TR]
[TD]H|l
[/TD]
[/TR]
[TR]
[TD]C/O Timmy & Assoc
[/TD]
[/TR]
[TR]
[TD]c/o
[/TD]
[/TR]
[TR]
[TD]H\o
[/TD]
[/TR]
[TR]
[TD](
[/TD]
[/TR]
[TR]
[TD]]
[/TD]
[/TR]
[TR]
[TD]Smith!!
[/TD]
[/TR]
[TR]
[TD]Paul/II
[/TD]
[/TR]
[TR]
[TD]465 Estate of
[/TD]
[/TR]
[TR]
[TD]Bob-Robert
[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 182"]
<tbody>[TR]
[TD]Paul*
[/TD]
[/TR]
[TR]
[TD].
[/TD]
[/TR]
[TR]
[TD]?
[/TD]
[/TR]
[TR]
[TD]*
[/TD]
[/TR]
[TR]
[TD]H|l
[/TD]
[/TR]
[TR]
[TD]C/O Timmy & Assoc
[/TD]
[/TR]
[TR]
[TD]c/o
[/TD]
[/TR]
[TR]
[TD]H\o
[/TD]
[/TR]
[TR]
[TD](
[/TD]
[/TR]
[TR]
[TD]]
[/TD]
[/TR]
[TR]
[TD]Smith!!
[/TD]
[/TR]
[TR]
[TD]Paul/II
[/TD]
[/TR]
[TR]
[TD]465 Estate of
[/TD]
[/TR]
[TR]
[TD]Bob-Robert
[/TD]
[/TR]
</tbody>[/TABLE]