I have some code for move text from cell to cell
Dim startIndex As Integer Dim toIndex As Integer Dim f As String Dim g As String For startIndex = 50 To 60
You could TRIM() the toIndex or REPLACE spaces in the end result, i.e.
TRIM()
toIndex
REPLACE
Replace ("alphabet", "a", "e") 'would return "elphebet"
example lifted from here: http://www.techonthenet.com/excel/formulas/replace.php
So...
f = Replace (f, " ", "")