Subtract Min() from MAX()

A

airgrz

I am trying to Subtract the MIN of a group from the MAX of a group!

How do I only use >0 numbers in the group!

Example:

1 $500
2 $300
3 $0 or blank
4 $50

I need $50 - $500 = $450
Not $0 - $500 = $500

Thank you in advance for your help!
 
G

Gary''s Student

=MAX(A1:A6)-MIN(IF(A1:A6>0,A1:A6,""))

this is an array formula that must be entered with CNTRL-SHFT-ENTER rather
than just the ENTER key.
 

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