SUMIF division

B

bob

From Sheet 2, I'd like a formula to calculate the following using an array:

If Sheet1 Column A = Sheet2 Column A
AND
If Sheet1 Column K > 0
THEN
Divide Sheet1 Column K by Sheet1 Column L

Can anyone help? Thanks.

Bob
 
L

Luke M

Assuming you are wanting a single-cell output, this array* formula will
work:

=SUM(IF((A2:A100=Sheet2!A2:A100)*(K2:K100>0),K2:K100)/Sheet2!L2:L100)

Note that if any cell in L2:L100 is text or equal to zero, an error will
occur.
*Array formulas must be confirmed using Ctrl+Shift+Enter, not just Enter
 

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