hi!
xxx = cell(3,text) = yyyy*
how do i replace instead of *
a or b or c or d or e or 1 or 2 or 3 or 4 or 5 or 6 or 8 or 9
Printable View
hi!
xxx = cell(3,text) = yyyy*
how do i replace instead of *
a or b or c or d or e or 1 or 2 or 3 or 4 or 5 or 6 or 8 or 9
Perhaps you can give a little more detail. Not sure exactly what you are asking for.
if the cell has a word ending with * instead of that replace a or b or c or d
Code:Worksheets("sheet1").Cells(1, 1).Value = Replace(Worksheets("sheet1").Cells(1, 1).Value, "*", "a")
Code:Sub Sample()
Dim valCell As String
valCell = Worksheets("sheet1").Cells(1, 1).Value
'~~> Check for last Character
If Right(valCell, 1) = "*" Then
Worksheets("sheet1").Cells(1, 1).Value = Left(valCell, Len(valCell) - 1) & "a"
End If
End Sub
KOOL
it works great. but i need to replace a to e and 1 to 9
if a do someting
and b so on tilll e and the same thing 1 to 9
didn't get your query... can you give an example?