Link to home
Start Free TrialLog in
Avatar of AndresHernando
AndresHernando

asked on

Excel VBA - Make cell contents null if cell contains only spaces

How can I do the following w/ VBA:
1) For a given range, make contents of cell "null" if cell contains only spaces.
2) For a given range, replace multiple concatenated space characters with single space

Thanks, --Andres
SOLUTION
Avatar of petr_hlucin
petr_hlucin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Rory Archibald
Rory Archibald
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AndresHernando
AndresHernando

ASKER

Rory, that's exactly what I needed.  Thanks!
Petr, thanks for your input.  I went with Rory's because it seems more straight forward and easier for me to understand.

Thanks again, --Andres