I have tried substitute and the below macro and it doesn't work. The orginal cell has 4 blank spaces after the value and I can't remove them all?
TIA,
Mark
Public Function RemoveSpaces(strInput As String)
' Removes all spaces from a string of text
Test:
If InStr(strInput, " ") = 0 Then
RemoveSpaces = strInput
Else
strInput = Left(strInput, InStr(strInput, " ") - 1) _
& Right(strInput, Len(strInput) - InStr(strInput, " "))
GoTo Test
End If
End Function
Try selecting a cell and hitting F2. It should place the cursor on the right side of the last character. Then hit Home. It should place the cursor on the left side of the first character. This will tell you if you have any spaces.
Also, when you hit Find, make sure that you do not have a check mark in the field that says Match Case or Find Entire Cells Only.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.