Multiple IF Statements

B

Brian

=IF(AND($F11="",$G11=""),"",IF(AND($F11="?",$G11="?"),"",IF(AND($F11=0,$G11=0),0,IF(OR($F11>0,$G11>0),(E11*F11)+(E11*G11/2)))))

I know these are multiple IF statements above, but I cant figure out what
the "" means?? eg. F11="". Does it mean if cell is blank then the cell with
this formula is blank ?

What about the "? " eg. F11="?". Does it mean if cell has any text in it
the the cell with this formula is blank ?

Thank for any feed back!

Brian
 
R

RobN

Brian,

If both cells F11 AND G11 are blank (ie "") then the result of this formula
will be blank.
This is the same with "?". That part of this formula is looking to see if
there is a ? in cell F11 and G11 and if there are, then the result will also
be blank.

Rob
 
B

Bob Phillips

? is not the wildcard here that you seem to think it is. Maybe you want

=IF(AND($F11="",$G11=""),"",IF(OR(NOT(ISNUMBER(F11)),NOT(ISNUMBER(G11))),"",IF(AND($F11=0,$G11=0),0,IF(OR($F11>0,$G11>0),(E11*F11)+(E11*G11/2)))))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
S

Stephen

Not quite correct. "" does not mean a blank cell. Rather it means a null
text string; that is, a text string with no characters in it. Initially,
this may sound the same, but there are important differences. For example, a
cell containing a formula cannot be blank, but the formula can return a null
text string. Such a cell, or a truly blank cell, will both satisfy the
condition A1="", but =ISBLANK(A1) will not be the same.
 
D

Dave F

How do you have "a text string with no characters in it"?

That's like "an algebraic equation with no variables in it."

Dave
 
B

Bob Phillips

No, a cell has a data type, or not, and a data size. They are different
properties of an object.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
S

Stephen

The closest analogy I can think of is the number zero. That's a numeric
value of "nothing". "" is a text string containing nothing (no characters).

The important point is that a formula can return a numeric value of zero or
a null text string (both of which, in their different ways, are "nothing"),
but it cannot return a blank cell.
 
D

Dave F

Well, this seems to make some sense.

If I put the following formula in B1, =IF(ISBLANK(A1),"",A1) , and
then in C1 enter =ISBLANK(B1) , FALSE is returned.

Dave
 
R

RagDyeR

Just to confuse you a little, with your same scenario, enter this in D1:

=COUNTBLANK(B1)

And you'll get a return of "1".

So, Isblank() says B1 is *not* blank (false), but Countblank() says it *is*
blank ( 1 ).

Talk about the consistency of the MS programmers.<bg>
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------


Well, this seems to make some sense.

If I put the following formula in B1, =IF(ISBLANK(A1),"",A1) , and
then in C1 enter =ISBLANK(B1) , FALSE is returned.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top