Sum largest numbers based on condition
This seemed to work okay (array entered-you must hit Control+Shift+Enter
after typing/pasting it into the formula bar). Change ranges as needed
=SUM(LARGE(IF(YEAR(A1:A11)=2006,B1:B11,""),
ROW(INDIRECT("1:"&MIN(5,SUM(--(YEAR(A1:A11)=2006)))))))
If you will always have at least 5 values that meet the criteria, you can
change
ROW(INDIRECT("1:"&MIN(5,SUM(--(YEAR(A1:A11)=2006)))))
to
ROW(INDIRECT("1:5"))
"Daniel Bonallack" wrote:
I did a quick search for something I know has been asked many times before -
sorry to repost...
I need to sum the 5 largest numbers in column B where the year in column A
is equal to 2006
Thanks very much in advance (bob?)...
|