Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2007

Tip: Looking for answers? Try searching our database.

An easy way to delete spaces in a cell...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LEG - 12 Nov 2007 16:32 GMT
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
Don Guillett - 12 Nov 2007 16:44 GMT
Sub replaceblank()
For Each c In Selection
c.Value = Replace(c, " ", "")
Next
End Sub

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

>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
[quoted text clipped - 4 lines]
> and 23161700? With either a formula, a macro, or a VBA module..... --
> LEG
LEG - 12 Nov 2007 17:09 GMT
Thanks ever so much.  It worked!
Signature

LEG

"Don Guillett" skrev:

> Sub replaceblank()
> For Each c In Selection
[quoted text clipped - 10 lines]
> > and 23161700? With either a formula, a macro, or a VBA module..... --
> > LEG
Don Guillett - 12 Nov 2007 17:27 GMT
Glad to help

Signature

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett1@austin.rr.com

> Thanks ever so much.  It worked!
>> Sub replaceblank()
[quoted text clipped - 13 lines]
>> > and 23161700? With either a formula, a macro, or a VBA module..... --
>> > LEG

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.