Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Removing spaces in numerous cells

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default Removing spaces in numerous cells

Assuming all data have 5 character, no blank cells and that you only want the
first and last 2 characters:

=Left(cell address,2)&right(cell address,2)

Should you experience problem if the result would be read as a number, use
this:

=if(isnumber(left(cell address,2),text(left(cell address,2),"00"),left(cell
address,2)) &if(isnumber(right(cell address,2),text(right(cell
address,2),"00"),right(cell address,2))



marti wrote:
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


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200909/1

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default Removing spaces in numerous cells

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

"marti" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Removing spaces in numerous cells

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.



marti wrote:

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


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,346
Default Removing spaces in numerous cells

Suppose your text is in A1 then

=REPLACE(A1,3,1,)

Copy down as necessary.
--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"marti" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Spaces In Cells Chris Excel Worksheet Functions 9 May 29th 08 06:45 PM
Removing spaces from cells CathyD Excel Worksheet Functions 4 November 13th 07 10:27 PM
Removing spaces from cells not possible? Robert M. Gary Excel Discussion (Misc queries) 4 October 12th 06 12:34 AM
Removing spaces in cells with data in it Ltat42a Excel Discussion (Misc queries) 7 August 7th 05 02:40 PM
Removing trailing spaces from cells ? Don Guillett Excel Worksheet Functions 0 April 10th 05 04:32 PM


All times are GMT +1. The time now is 05:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"