Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() try following code Code: -------------------- Private Sub mySub() Dim row As Integer, col As Integer row = 1 col = 1 Dim str As String Dim i As Integer While Sheet1.Cells(row, col).Value < "" '*F0123450 --- *F*123450* str = Sheet1.Cells(row, col).Value If Mid(str, 3, 1) = "0" Then str = Left(str, 2) & "*" & Mid(str, 4, Len(str)) Sheet1.Cells(row, col).Value = str End If row = row + 1 Wend End Sub -------------------- Chris ------ Convert your Excel spreadsheet into an online calculator. http://www.spreadsheetconverter.com -- Chris Bode |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find & replace with text | Excel Discussion (Misc queries) | |||
Replace can't find text | Excel Discussion (Misc queries) | |||
find text in cell and replace it with part of the text in that ce. | Excel Discussion (Misc queries) | |||
Find & Replace in Text Box | Excel Discussion (Misc queries) | |||
Find/Replace Text In Cells | Excel Discussion (Misc queries) |