Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
LEG LEG is offline
external usenet poster
 
Posts: 16
Default An easy way to delete spaces in a cell...

I have a list of numbers which are written with a space between each set of
numbers. Example: In cell A1 is: 12 13 14 15, in cell A2 is 23 16 17 00 and
so on.
Is there an easy way to delete all the spaces so the end result is 12131415
and 23161700? With either a formula, a macro, or a VBA module..... --
LEG
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default An easy way to delete spaces in a cell...

Sub replaceblank()
For Each c In Selection
c.Value = Replace(c, " ", "")
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"LEG" wrote in message
...
I have a list of numbers which are written with a space between each set of
numbers. Example: In cell A1 is: 12 13 14 15, in cell A2 is 23 16 17 00
and
so on.
Is there an easy way to delete all the spaces so the end result is
12131415
and 23161700? With either a formula, a macro, or a VBA module..... --
LEG


  #3   Report Post  
Posted to microsoft.public.excel.newusers
LEG LEG is offline
external usenet poster
 
Posts: 16
Default An easy way to delete spaces in a cell...

Thanks ever so much. It worked!
--
LEG


"Don Guillett" skrev:

Sub replaceblank()
For Each c In Selection
c.Value = Replace(c, " ", "")
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"LEG" wrote in message
...
I have a list of numbers which are written with a space between each set of
numbers. Example: In cell A1 is: 12 13 14 15, in cell A2 is 23 16 17 00
and
so on.
Is there an easy way to delete all the spaces so the end result is
12131415
and 23161700? With either a formula, a macro, or a VBA module..... --
LEG



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
delete single spaces Mark R Excel Discussion (Misc queries) 5 May 31st 07 05:03 PM
How do I delete spaces from the end of text George Excel Discussion (Misc queries) 4 September 11th 06 07:33 AM
how do I delete the last two spaces in a cell brantty Excel Discussion (Misc queries) 2 July 27th 06 01:14 AM
Delete Spaces and Join Text in Cell Diggsy Excel Worksheet Functions 3 October 5th 05 03:50 AM
delete spaces CHARI Excel Worksheet Functions 2 September 9th 05 10:38 AM


All times are GMT +1. The time now is 10:24 PM.

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

About Us

"It's about Microsoft Excel"