Testing to see if a cell is blank or contains only spaces

hikerguy

New Member
Joined
Sep 11, 2014
Messages
13
Hello,

I know of the ISBLANK feature, but that only works if a cell is truly empty (nothing in the cell and no space characters). Is there a function that would do this?

Alternatively, is there a way to remove all spaces from an empty cell?

Thanks,

Andy
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
=len(trim(a1)) returns zero of a cell contains only spaces.

is there a way to remove all spaces from an empty cell?
An empty cell has no spaces, but to clear the contents of any cell, select and press Delete.
 
Upvote 0
shg, It's a little hard to explain what I'm doing, but I have to account for a user hitting the space part in this template.

But, the good news is your suggestion was exactly what I was needing, so huge thanks!
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top