LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Remove spaces

Try this:

Sub SpaceKiller()
For Each r In ActiveSheet.UsedRange
v = r.Value
If Len(v) 0 And Len(Replace(v, " ", "")) = 0 Then
r.Clear
End If
Next
End Sub
--
Gary''s Student - gsnu201003


"QB" wrote:

I have been given an excel workbook which I need to import into Access.
After lengthy testing I found out that I have been experiencing import
problem because the excel spreadsheet contains 'blank entries' where the user
made a series of spaces but no actual text. So then Access interprets the
spaces as text, and it violate the established format.... (you get the point)

Is there a simple way for me to clean up these 'blank entries'? How can I
loop through a given spreadsheet and blank any cell with spaces (no text, no
date... just spaces)?

Thank you,

QB

 
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
Remove spaces QB Excel Programming 0 May 27th 10 09:27 PM
Remove spaces Gary''s Student Excel Programming 0 May 27th 10 08:53 PM
How can i remove spaces? Lion2004 Excel Discussion (Misc queries) 1 March 9th 07 11:57 AM
how do I remove leading spaces and leave the remianing spaces w Debi Excel Worksheet Functions 6 February 28th 07 03:29 PM
How do I remove spaces lovebaby Excel Discussion (Misc queries) 5 October 29th 05 02:08 PM


All times are GMT +1. The time now is 12:09 AM.

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"