Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default LookUp Returning more than one rows

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,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 523
Default LookUp Returning more than one rows

Hi,

You can use =SUMIF(A2:A5,"John",B2:B5)

"John" wrote:

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,

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default LookUp Returning more than one rows

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.

"Sam Wilson" wrote:

Hi,

You can use =SUMIF(A2:A5,"John",B2:B5)

"John" wrote:

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,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup returning #n/a irvine79 Excel Discussion (Misc queries) 2 June 1st 09 11:11 PM
Lookup is not returning the right value. vvenk Excel Worksheet Functions 3 December 3rd 07 09:26 PM
Lookup returning one more than expected Victor Excel Worksheet Functions 3 November 23rd 06 11:40 PM
Returning all values from a lookup - not just the first/last one Jim Burns Excel Worksheet Functions 2 June 20th 05 04:04 PM
Returning varying rows of data through lookup function NewbieNerd Excel Programming 1 August 26th 04 06:07 PM


All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"