array formula troubles

C

Carolyn

Alas! I must be missing something in my formula. I am
entering a very simple array formula which is as follows:

{=if(O2:O44=100,sum(P2:p44))}
{=if(O2:O44=100,sum(P2:p44))}

In column O there are two choices, either 100 or 140.
What I need is a total from column P for each 100 and 140
that exists in O. I can get a total for 140 but I can not
get a total for 100. Instead I get a FALSE response. It
is as though the formula is only applying the IF criteria
to the first row of my range. The first row reads 140 in
O2. If I change it to 100 then the FALSE is now replaced
with a number.
Question: How can I get my array formula using the IF
statement criteria to apply to the entire range of rows
rather then just the first row?
Many thanks!
 
P

Peo Sjoblom

I am not entirely sure I understand you but here goes

=IF(OR(O2:O44=100,O2:O44=140),SUM(P2:p44),"")

array entered with ctrl + shift & enter
 
R

Ron Rosenfeld

Alas! I must be missing something in my formula. I am
entering a very simple array formula which is as follows:

{=if(O2:O44=100,sum(P2:p44))}
{=if(O2:O44=100,sum(P2:p44))}

In column O there are two choices, either 100 or 140.
What I need is a total from column P for each 100 and 140
that exists in O. I can get a total for 140 but I can not
get a total for 100. Instead I get a FALSE response. It
is as though the formula is only applying the IF criteria
to the first row of my range. The first row reads 140 in
O2. If I change it to 100 then the FALSE is now replaced
with a number.
Question: How can I get my array formula using the IF
statement criteria to apply to the entire range of rows
rather then just the first row?
Many thanks!

Your SUM is in the wrong place:

Array enter:

=SUM(IF(O2:O44=100,P2:p44,""))

Another formula that will give the same result:

=SUMIF(O2:O44,100,P2:p44)




--ron
 
C

Carolyn

Aha! Thank you very much Ron!

-----Original Message-----


Your SUM is in the wrong place:

Array enter:

=SUM(IF(O2:O44=100,P2:p44,""))

Another formula that will give the same result:

=SUMIF(O2:O44,100,P2:p44)




--ron
.
 

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

Top