ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Emptying cells containing a single blank (https://www.excelbanter.com/excel-programming/312858-emptying-cells-containing-single-blank.html)

Ken Loomis

Emptying cells containing a single blank
 
I have a column where all the cells either have something like "# 45" or a
single blank or are empty.

I need to make all cells with a single blank be empty.

Is there a way to do that without using a loop and testing each cell?

Thanks,
Ken Loomis



Tom Ogilvy

Emptying cells containing a single blank
 
Columns(2).Replace What:=" ", _
Replacement:="", _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
MatchCase:=False

--
Regards,
Tom Ogilvy

"Ken Loomis" wrote in message
...
I have a column where all the cells either have something like "# 45" or a
single blank or are empty.

I need to make all cells with a single blank be empty.

Is there a way to do that without using a loop and testing each cell?

Thanks,
Ken Loomis






All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com