Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Is this a global replace, or line by line?I replace the mumber with corresponding character string adding <b> </b> tags to it.
Sub FormatCells()
For Each s In ActiveSheet.UsedRange
p1 = 0
p2 = 0
For i = 1 To Len(s.Value)
Select Case Mid(s.Value, i, 3)
Case "<b>"
p1 = i
Case "</b"
p2 = i
End Select
Next
If p1 > 0 And p2 > p1 Then
s.Value = Mid(s.Value, p1 + 3, Len(s.Value) - p2 - 2)
End If
Next
End Sub
Sub FormatCells()
For Each s In ActiveSheet.UsedRange
p1 = 0
p2 = 0
With s
For i = 1 To Len(.Value)
Select Case Mid(.Value, i, 3)
Case "<b>"
p1 = i
Case "</b"
p2 = i
End Select
Next
If p1 > 0 And p2 > p1 Then
.Value = Mid(.Value, p1 + 3, Len(.Value) - 7)
.Font.Bold = True
End If
End With
Next
End Sub