1) Does the 44 that you want to replace always appear at the beginning of the number?I have data which appears as: 447596125369
44 appears in all cells
I need to replace 44 with 0 and add a space to result in 07596 125369
I have 500,000 records so find / replace is not an option
Why is Find /Replace not an option ??
selection.value=evaluate("if(row(),mid(" & selection.address & ",3,255))")
Sub Replace44With0InsertSpace()
Dim R As Long, C As Long, Nums As Variant
Const RangeWithNumbers As String = "[COLOR=#ff0000][B]A1:C16[/B][/COLOR]"
Nums = Range(RangeWithNumbers)
For R = 1 To UBound(Nums)
For C = 1 To UBound(Nums, 2)
If Len(Nums(R, C)) Then
Mid(Nums(R, C), 1) = " 0"
Nums(R, C) = Format(Trim(Nums(R, C)), "00000 000000")
End If
Next
Next
Range(RangeWithNumbers) = Nums
End Sub