IF Statement recognizing any text

tycasey17

Board Regular
Joined
Sep 26, 2013
Messages
93
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
I assumed that the following statement would recognize any text (either numbers or letters) and have the return of "1" or "0" for true or false respectively.

Statement: =IF(A1="*",1,0) and I have tired =IF(A1=*,1,0) Niether have worked

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Text[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][blank][/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]
 
I assumed that the following statement would recognize any text (either numbers or letters) and have the return of "1" or "0" for true or false respectively.

Statement: =IF(A1="*",1,0) and I have tired =IF(A1=*,1,0) Niether have worked

[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Text[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][blank][/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]

The IF function does not support wildcards; however, you can do what you want this way...

=IF(A1="",0,1)
 
Upvote 0
Hi,

Not sure about using the wildcard, but this should do the job:

=IF(LEN(A1)>0,1,0)

HTH

Robert
 
Upvote 0

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