ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Search and add (https://www.excelbanter.com/excel-discussion-misc-queries/250375-search-add.html)

Vishnu

Search and add
 
Hi,
I have data in 2 columns ex. Col 1: Name, Col 2: Amount
A name can appear multiple times with same or different amounts.

Ex: Col 1 : A, C, A, A,A ; Col 2: $10, $30, $40, $20, $30

Can someone suggest if there is a function in excel 2003 i can use with the
data from Col 1 and Col 2 and by giving a search entry "A" i should get the
sum of all corresponding A entries in Column 2 i.e. $100

Thanks in advance


T. Valko

Search and add
 
Try something like this...

=SUMIF(A2:A6,"A",B2:B6)

Or, using a cell to hold the criteria:

D2 = A

=SUMIF(A2:A6,D2,B2:B6)

--
Biff
Microsoft Excel MVP


"Vishnu" wrote in message
...
Hi,
I have data in 2 columns ex. Col 1: Name, Col 2: Amount
A name can appear multiple times with same or different amounts.

Ex: Col 1 : A, C, A, A,A ; Col 2: $10, $30, $40, $20, $30

Can someone suggest if there is a function in excel 2003 i can use with
the
data from Col 1 and Col 2 and by giving a search entry "A" i should get
the
sum of all corresponding A entries in Column 2 i.e. $100

Thanks in advance




Jim Thomlinson

Search and add
 
SumIf will do what you are asking...
--
HTH...

Jim Thomlinson


"Vishnu" wrote:

Hi,
I have data in 2 columns ex. Col 1: Name, Col 2: Amount
A name can appear multiple times with same or different amounts.

Ex: Col 1 : A, C, A, A,A ; Col 2: $10, $30, $40, $20, $30

Can someone suggest if there is a function in excel 2003 i can use with the
data from Col 1 and Col 2 and by giving a search entry "A" i should get the
sum of all corresponding A entries in Column 2 i.e. $100

Thanks in advance


Vishnu

Search and add
 
It worked..Thanks

"Jim Thomlinson" wrote:

SumIf will do what you are asking...
--
HTH...

Jim Thomlinson


"Vishnu" wrote:

Hi,
I have data in 2 columns ex. Col 1: Name, Col 2: Amount
A name can appear multiple times with same or different amounts.

Ex: Col 1 : A, C, A, A,A ; Col 2: $10, $30, $40, $20, $30

Can someone suggest if there is a function in excel 2003 i can use with the
data from Col 1 and Col 2 and by giving a search entry "A" i should get the
sum of all corresponding A entries in Column 2 i.e. $100

Thanks in advance



All times are GMT +1. The time now is 10:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com