IsBlank but for a "Space" character

Chuckarou

New Member
Joined
Jul 12, 2018
Messages
19
Hi all,
I was wondering if any of you had a formula the works in the same way as ISBLANK but would detect the space character ("") instead of blank cells. I have a lot of formulas the return "" if a number of criteria aren't met, so I need a formula to detect them. I've tried creating my own function:
VBA Code:
Public Function ISCLEAR(Value) As Variant

    If Value = 0 Then
        ISCLEAR = True
    ElseIf Value = "" Then
        ISCLEAR = True
    ElseIf Value = " " Then
        ISCLEAR = True
    ElseIf Value = "CHAR(160)" Then
        ISCLEAR = True
    Else: ISCLEAR = False
    End If
    
End Function

with no success.

Thanks in advance,
Chuckaroo
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
"" this is not a space but 0 length string (empty string)
space =char(32)
 
Last edited:
Upvote 0
Ohh I see, well is there a formula that will recognize a 0 length string in the same way IsBlank recognizes a blank cell?
 
Upvote 0
maybe
isempty.png

or as suggested above
len.png
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,205
Messages
6,123,634
Members
449,109
Latest member
Sebas8956

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