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 / June 2007

Tip: Looking for answers? Try searching our database.

TRIM function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
fitou_learn - 12 Jun 2007 09:00 GMT
Is it possible to trim an entire worksheet?
Mike H - 12 Jun 2007 09:46 GMT
You could use a macro

Sub trimall()
Application.ScreenUpdating = False
   Dim myRange As Range
   Set myRange = Range("A1:D1000") '< Change to suit
       For Each c In myRange
           c.Select
           c.Value = Trim(c.Value)
       Next c
Application.ScreenUpdating = True
End Sub

Mike

> Is it possible to trim an entire worksheet?
fitou_learn - 12 Jun 2007 11:06 GMT
Many thanks Mike.  It worked a treat!

> You could use a macro
>
[quoted text clipped - 12 lines]
>
> > Is it possible to trim an entire worksheet?

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.