ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   look up same values in coumn1 and calculate values in 2nd column (https://www.excelbanter.com/excel-worksheet-functions/28977-look-up-same-values-coumn1-calculate-values-2nd-column.html)

khan

look up same values in coumn1 and calculate values in 2nd column
 
I have a sheet which has 2 columns. One is called company and other is
called "cost". I want a function which will look for a company in the
whole column and and calculate the cost in 2nd column for the company.
Like column one is full with name of compaies(khan And Co, John & Co,
Rich & sons). these companies are repeated 50 times in column one.
Can any one help me out, Is it possible to do that.


Peo Sjoblom

Look up SUMIF in help

=SUMIF(Range1,"company",Range2)


Regards,

Peo Sjoblom

"khan" wrote:

I have a sheet which has 2 columns. One is called company and other is
called "cost". I want a function which will look for a company in the
whole column and and calculate the cost in 2nd column for the company.
Like column one is full with name of compaies(khan And Co, John & Co,
Rich & sons). these companies are repeated 50 times in column one.
Can any one help me out, Is it possible to do that.



Ron Coderre

If you only need to calculate the sum for one company:
C1: Company name
D1: =SUMIF(A1:A1000,C1,B1:B1000)

If you need the totals for all (or many) companies, I'd consider a Pivot
Table.

I hope that helps.
--
Regards,
Ron



IlanR

Try =SUMIF(your range for Company,Name of Company you are looking to
Sum,your range for Cost)
Ilan
khan wrote:
I have a sheet which has 2 columns. One is called company and other is
called "cost". I want a function which will look for a company in the
whole column and and calculate the cost in 2nd column for the company.
Like column one is full with name of compaies(khan And Co, John & Co,
Rich & sons). these companies are repeated 50 times in column one.
Can any one help me out, Is it possible to do that.



IlanR

Try =SUMIF(your range for Company,Name of Company you are looking to
Sum,your range for Cost)
Ilan
khan wrote:
I have a sheet which has 2 columns. One is called company and other is
called "cost". I want a function which will look for a company in the
whole column and and calculate the cost in 2nd column for the company.
Like column one is full with name of compaies(khan And Co, John & Co,
Rich & sons). these companies are repeated 50 times in column one.
Can any one help me out, Is it possible to do that.




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

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