Это сделает это:
Sub Button2_Click()
Range("D5").Value = FixString(Range("B4").Text, "*")
End Sub
Function FixString(sIn As String, sAdd As String) As String
Dim sOut As String, sChNow As String, _
nChNow As Integer, nChNext As String, _
nLen As Integer
nLen = Len(sIn)
If nLen > 1 Then
For i = 1 To nLen - 1
sChNow = Mid(sIn, i, 1)
sOut = sOut & sChNow
nChNow = Asc(sChNow)
nChNext = Asc(Mid(sIn, i + 1, 1))
If ((nChNext >= 65 And nChNext <= 90) Or _
(nChNext >= 97 And nChNext <= 122)) And _
((nChNow >= 48 And nChNow <= 57)) Then
sOut = sOut & sAdd
End If
Next i
FixString = sOut & Right(sIn, 1)
Else
FixString = sIn
End If
End Function
Просто отредактируйте подпрограмму Button2_Click() в соответствии с вашей ситуацией.