dwhitey1124
New Member
- Joined
- Oct 24, 2014
- Messages
- 28
Hi everyone, I am working on a file that requires constant use of underscores. I would like to hide these underscores. I having been trying to find a way to select all instances of underscores (in unhidden and hidden sheets) and change the font to transparent. The closest I got is the below, but it's not good. Any help would be very much appreciated. Sub Underscore()
Dim rng As Selection
Dim Cell As Range
Dim start_str As Integer
Workbook.Select
Set rng = Selection
For Each Cell In rng
start_str = InStr(Cell.Value, "_")
If start_str Then
With Cell.Characters(start_str, 1).Font
.ColorIndex = xlNone
End With
End If
Next
End Sub
Dim rng As Selection
Dim Cell As Range
Dim start_str As Integer
Workbook.Select
Set rng = Selection
For Each Cell In rng
start_str = InStr(Cell.Value, "_")
If start_str Then
With Cell.Characters(start_str, 1).Font
.ColorIndex = xlNone
End With
End If
Next
End Sub