IF empty,null, return a value in an IF statement

pete234

Active Member
Joined
Feb 10, 2004
Messages
419
Can anyone help with this I suppose easy formula?
I am trying to return a value for scoring so I can group some data.
I want to return -10 if the Phone field is blank AND the bounce field=1.
I've tried a dozen versions of this based off the example at msdn.
I get either too few, too many or 2nd and 3rd data types do not match.
I can't even find if I'm using the correct format for blank.

=IF(AND([Bounce]=1,[Phone]="",true),"-10","0"

Anyone have any suggestions?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I'm guessing at this as I don't know your details. Does your table have a name. I am assuming if you have field names, then you probably have a table. As such, I think that you need to add the table name in front of the field name. Probably something like this

=IF(and(tablename.[Bounce]=1,tablename.[Phone]=""),-10,0)

The other thing is that the syntax is incorrect.

syntax for IF statements are If(criteria,Results if true, results if False)

Try it with and without the tablename.
 
Upvote 0
Thanks for this suggestion. I realize I may have to evaluate phone as "not empty". But the only thing I found is ISTEXT but this only takes one argument.
So is there a way to use Not Null with IF? My field Phone is text or empty.
Using table name did get the formula to work.
 
Last edited:
Upvote 0
Hi Pete,

I believe wat you need is ISBLANK().
In your formula the AND functions has 3 arguments, but it only takes 2..
I think both the formulas beneath suit your needs?

Code:
=IF(AND(Table[Bounce]=1,ISBLANK(Table[Phone])), -10, 0)
Code:
=IF(Table[Bounce]=1 && ISBLANK(Table[Phone]), -10, 0)
 
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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