Calculate new price with conditions

M

matt4003

I found that this function works, but it has the potential to be ver
long.

=sum(if(A2="x",B2*B1,0)+if(A3="x",B3*B1,0)+if(A4="x",B4*B1,0)+if(A5="x",B5*B1,0)+B1)

It would be nice if I could set a range, for exampl
=sum(if(A2:A5="x",((B2:B5)*(B1)+B1),B1))

But I don't think that will work, maybe a sumproduct statement...an
ideas??

Thanks,
Mat
 
M

Myrna Larson

SUMIF will do nicely. You don't need SUMPRODUCT or an array formula. See my
previous response.
 

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