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 / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Spaces in a cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kush28 - 23 Feb 2006 04:11 GMT
Hi

is there a way to check if a cell has spaces in it ?

If there is then can we remove the spaces.

for eg.

Logan Central Plaza ... <--- how can i remove the spaces to make it

LoganCentralPlaza please

Any idea

Thanks
Ron Rosenfeld - 23 Feb 2006 04:26 GMT
>Hi
>
[quoted text clipped - 12 lines]
>Thanks
>K

=SUBSTITUTE(A1," ","")

--ron
Edwin Tam - 23 Feb 2006 04:26 GMT
To test whether a cell contains space, e.g. cell a1,

Dim a  as boolean
If instr(Range("A1").value," ") <> 0 then
 a = true
else
 a  = false
end if

To remove all space in the selected cells,
Selection.Cells.Replace What:=" ", Replacement:=""

Regards,
Edwin Tam
support@vonixx.com
http://www.vonixx.com

> Hi
>
[quoted text clipped - 12 lines]
> Thanks
> K
purplemx - 24 Feb 2006 23:12 GMT
Please try  

=trim(a1)

Thanks

>Hi
>
[quoted text clipped - 11 lines]
>
>Thanks

Signature

purplemx

Pivotrend - 28 Feb 2006 14:05 GMT
 
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.