Removing spaces in numerous cells

M

marti

I have a couple hundred rows of data where I need to change the format.
The format right now is one of these:
"01 01"; "01 02"; "01 03" or
"03AAP"; "03A02"; "03DDP"
I need them to look like this:
"0101"; "0102"; "0103" or
"03AP"; "0302"; "03DP"

Any recommendations? I use Excel 2003
 
A

AnotherNewGuy

Just do a simple replace.

Highlight the rows you want affected.
Click Edit
Click Find and select the Replace tab
In the Find What slot hit the space bar once
In the Replace with slot, do nothing

Select Replace All
 
D

Dave Peterson

If all that data is in a single column, then I'd insert a column directly to the
right of it and use a formula like:

=left(a1,2)&right(a1,2)
And drag down.

This should work if all your strings are 5 characters.
 
S

Shane Devenshire

Suppose your text is in A1 then

=REPLACE(A1,3,1,)

Copy down as necessary.
 

Ask a Question

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.

Ask a Question

Top