View Single Post
  #2   Report Post  
Domenic
 
Posts: n/a
Default


Phillycheese5 Wrote:
I have a formula that finds and sums the top 5 values in column A for a
given range:

SUM(LARGE($A$3:$A$500,ROW(INDIRECT("1:5"))))


This formula can be changed to eliminate the need to confirm with
CONTROL+SHIFT+ENTER...


Code:
--------------------
=SUM(LARGE($A$3:$A$500,{1,2,3,4,5}))

...confirmed with just ENTER.
--------------------


Now I want to use the top 5 criteria in column A to sum corresponding
cells in B.
I tried incorporating into this formula:

SUM(IF(A3:A500=LARGE(A3:A500,ROW(INDIRECT("1:5"))) ,B3:B19))


Try...


Code:
--------------------
=SUMPRODUCT(($A$3:$A$500=(LARGE($A$3:$A$500,{1,2,3 ,4,5})))*$B$3:$B$500)

...confirmed with just ENTER
--------------------


Hope this helps!


--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=378092