seekyourway
New Member
- Joined
- Nov 1, 2011
- Messages
- 21
Hi,
I wanted to bold all the characters in a range from the beginning up to where the ":" is. Sample files:
Data is always in 1st column. I have some code below, but when I run it, it bolds the whole thing, bypassing what's in the loop. Would someone please give an advice/pointer?
Sub Bolder2()
Dim rng As Range, r As Range, strR As String
Dim i As Long, j As Long, k As Long
Set rng = Intersect(Columns(1), ActiveSheet.UsedRange)
For Each r In rng
strR = r.Text
For i = 1 To InStr(strR, ":")
r.Font.Bold = True
Next i
Next r
End Sub
Thank you for your assistance
I wanted to bold all the characters in a range from the beginning up to where the ":" is. Sample files:
dsjakgjdkfa: dgda. (50%) |
geadfdafd: fdagad, (.) |
gadfdgad: gdadg @gdad |
Data is always in 1st column. I have some code below, but when I run it, it bolds the whole thing, bypassing what's in the loop. Would someone please give an advice/pointer?
Sub Bolder2()
Dim rng As Range, r As Range, strR As String
Dim i As Long, j As Long, k As Long
Set rng = Intersect(Columns(1), ActiveSheet.UsedRange)
For Each r In rng
strR = r.Text
For i = 1 To InStr(strR, ":")
r.Font.Bold = True
Next i
Next r
End Sub
Thank you for your assistance