Let me be more clear.
The first set of digets will always be 9 char long and the next set of
digits will start at char 16. Id like to loop thru the column and trim the
spaces in the middle
with cell.Offset(0, 6)
.Value = trim(.Value)
end with
or
with cell.Offset(0, 6)
.Value = application.trim(.Value)
end with
The difference between VBA's Trim and excel's =trim() is how they treat
consecutive internal spaces. VBA's Trim will leave them as-is. Excel's =trim()
will "trim" them to a single character.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.