How to code macro with if condition?
Sub eric001()
v = Sheets("Temp").Range("B15").Value
Set myCell = Range("A1")
If InStr(1, v, "M") Then
v = Replace(v, "M", "")
Else
If InStr(1, v, "B") Then
v = Replace(v, "B", "") * 1000
End If
End If
myCell.Offset(0, 3).Value = v
End Sub
--
Gary''s Student - gsnu200773
|