IF statement inside a SUMIF statement.... or alternative method

S

Sungibungi

I'm just not sure whether this is possible or not.

Can I create a function that goes as below:

=SUMIF(IF(......),Z,A:A)

It seems when I insert an IF statement inside a SUMIF statement, Excel
returns #VALUE! If this is not allowed, how do I get around this problem?
 
E

Eduardo

Hi,
the sumif already has the criteria, what do you want to achieve, please post
an example
 
T

T. Valko

=SUMIF(IF(......),Z,A:A)

SUMIF can't be used like that.

Try explaining in words what you want to do.
 
P

Paul C

you may have you criteria in the wrong order

SUMIF(range, criteria, [sum_range]) is the correct format.

Your IF statement would need to evaluate to a range (both when true or
false) to work as you have written your formula. It is possible to have a if
statement return a range (using the offset function would work), but there is
likely an easier way.

You did not provide much detail so I cannot give you a definate answer, but
can offer the following advice.

If you wish to sum something based on multiple criteria (for example sum up
all values in c1:c10 where column A=1 and B="Yes") you could do this in two
ways.

If you have Excel 2007 use the SUMIFS function which allows for multiple
criteria or
use a sumproduct function with conditions.

the formula =Sumproduct(--(A1:a10=1),(b1:b10="Yes"),C1:C10) would work.
 

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