O
Otto Moehrbach
Excel 2002, Win XP
I'm helping an OP who is transferring data to Excel from somewhere and from
Excel to a database program, usually Access. The data consists of some
cells that have:
Data and spaces -that's OK
Blank cells - that's OK
Cells with one or more spaces and nothing else - That's not OK. I'll call
them "spaces cells" for this post. My problem is that the number of spaces
can vary.
He needs to blank (clear) all the "spaces cells".
All I can think of is to:
Loop through all the cells in the used range
Check for Len<>0
Then loop through all the characters of that cell and if I find any
character other than the space character, go to the next cell, otherwise
clear that cell.
Is there an easier (faster) way to do this? Thanks for your help. Otto
I'm helping an OP who is transferring data to Excel from somewhere and from
Excel to a database program, usually Access. The data consists of some
cells that have:
Data and spaces -that's OK
Blank cells - that's OK
Cells with one or more spaces and nothing else - That's not OK. I'll call
them "spaces cells" for this post. My problem is that the number of spaces
can vary.
He needs to blank (clear) all the "spaces cells".
All I can think of is to:
Loop through all the cells in the used range
Check for Len<>0
Then loop through all the characters of that cell and if I find any
character other than the space character, go to the next cell, otherwise
clear that cell.
Is there an easier (faster) way to do this? Thanks for your help. Otto