SUMPRODUCT with If condition

J

JPS

=SUMPRODUCT(--(Other!$G$2:$G$10000>=C$4),--(Other!$O$2:$O$10000 =
""),Other!$H$2:$H$10000)


The formula above works fine. However, I need to modify it to do the
following:

If Column J on the "Other" worksheet has a value, I need my match to refer
to column J. However, if column J is blank, I need the match to refer to
column G as it is doing above.
 
P

PCLIVE

Maybe this:

=SUMPRODUCT(--(Other!$J$2:$J$10000<>""),Other!$J$2:$J$10000>=C$4),--(Other!$O$2:$O$10000
=
""),Other!$H$2:$H$10000) +
SUMPRODUCT(--(Other!$J$2:$J$10000=""),Other!$G$2:$G$10000>=C$4),--(Other!$O$2:$O$10000
=
""),Other!$H$2:$H$10000)

HTH,
Paul
 
S

Shane Devenshire

Hi,

What column J? There is no column J in your formula. There is not MATCH in
your formula, could you be a little bit more specific.

Cheers,
Shane Devenshire
 
B

barry houdini

Hello JPS,

Perhaps try changing to an "array formula" like this

=SUM(IF(IF(Other!$J$2:$J$10000<>"",Other!$J$2:$J$10000,Other!$G$2:$G
$10000)>=C$4,IF(Other!$O$2:$O$10000="",Other!$H$2:$H$10000)))

Needs to be confirmed with CTRL+SHIFT+ENTER so that curly braces
appear around the formula in the formula bar
 

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