LookUp Returning more than one rows

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

I have a sheet

A B

John 100
Alex 150
John 175
Steve 125

i want to get the sum of the entries for John, say here i have to get the
result as 100+175 = 275. Is there any function for me to do it?

I tried LookUp but its returning only the first value.

Thanks in advance
John,
 
You can also use an array formula:

{sum((A2:A5="john")*B2:B5)}

or if you have more than one criteria, you want john and steves totals:

{sum((A2:A5="john")+(A2:A5="steve")*B2:B5)}

remember to hold ctr+shift when you hit the enter key for array formulas.
 
Back
Top