The macro below removes the comma from the string but changes some of the information into a decmil.
For example, ,2536 8/22 becomes 2536 4/11. In the formula bar, it reads; 2536.36363636364.
It should be; 2536 8/22 (just without the comma)
I tried changing the Value2s to Value and then I remove it but nothing seems to do the trick.
Any help is appreciated.
Thank you
For example, ,2536 8/22 becomes 2536 4/11. In the formula bar, it reads; 2536.36363636364.
It should be; 2536 8/22 (just without the comma)
I tried changing the Value2s to Value and then I remove it but nothing seems to do the trick.
Code:
With Worksheets("Sheet1")
For i = 4 to 12
Do
If Left$(.Cells(i, "C").Value2, 1) = "," then
.Cells(i, "C").Value2 = Right$(.Cells(i, "C").Value2, Len(.Cells(i, "C").Value2) - 1)
End if
Loop While Left$(.Cells(i, "C").Value2, 1) = ","
.Cells(i, "C").Value2=Ltrim(.Cells(i, "C").Value2)
Next I
End with
Any help is appreciated.
Thank you