Thread: IF and
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default IF and

You can not use "AND" function in an arrray formula.

Sure you can. Array entered:

=AND(A1:A10="x")

If any cell does not = "x" then the result is FALSE.

That is the same as:

=COUNTIF(A1:A10,"x")=10

=IF(AND(A:A="x",B:B=""),SUM(C:C))


If *every* cell in A = "x" and *every*cell in B = "" then that formula would
work (if array entered).

Obviously, that's not how the OP intended it to work.


--
Biff
Microsoft Excel MVP


"Teethless mama" wrote in message
...
You can not use "AND" function in an arrray formula. Use "*" isnstead of
"AND"

=SUM(IF((A:A="x")*(B:B=""),C:C))
ctrl+shift+enter, not just enter
or
=SUM((A:A="x")*(B:B="")*C:C)
Also ctrl+shift+enter, not just enter


Caroline" wrote:

Oh and why is the IF AND not working?
Sorry I'm anal...

"Teethless mama" wrote:

=SUMPRODUCT(--(A1:A100="X"),--(B1:B100=""),C1:C100)
you can not use whole columns (eg. A:A, B:B, or C:C) unless you are
using
XL-2007

"Caroline" wrote:

I want to sum amounts from one column if 2 other columns meet the
criteria I
defined.
Here is what I have: =IF(AND(A:A="x",B:B=""),SUM(C:C))
Even though I have a lot of rows that match both criteria (have an
"x" in
column A and nothing in column B), the formula returns "false".
Any ideas? Thanks!