#1   Report Post  
khan
 
Posts: n/a
Default SumIF

I posted this type of question earlier but it has different nature.
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 etc). these companies are repeated 50 times in column
one.
I got my answer how to get sum for specific companies. Now the problem
is, I am asked to make a template so any one can use it. Problem is
these companies' name are not always same name, they could be
changed.In january there could be only 3 companies but in march they
could be any 13 companies' with different names. I can calculate total
and make it as a template only if I know which company is being used
but if some one else who does not know any thing abt excel formula and
using my sheet as a template cant get the right total.
=SUMIF(C4:C12,"=khan",D4:D12)
=SUMIF(C4:C12,"=John",D4:D12)
what if some one who is using my template will use "harris" instead of
"khan". Is there any way if user enter the company name and formula
changes its value automatically.

  #2   Report Post  
Per Erik Midtrød
 
Posts: n/a
Default

Maybe I've minunderstood something, but could it be as way as:
SUMIF(C2:C3;F1;D2:D3)

Where you enter company name in F1.

Per Erik

On 2 Jun 2005 11:17:10 -0700, "khan" wrote:

I posted this type of question earlier but it has different nature.
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 etc). these companies are repeated 50 times in column
one.
I got my answer how to get sum for specific companies. Now the problem
is, I am asked to make a template so any one can use it. Problem is
these companies' name are not always same name, they could be
changed.In january there could be only 3 companies but in march they
could be any 13 companies' with different names. I can calculate total
and make it as a template only if I know which company is being used
but if some one else who does not know any thing abt excel formula and
using my sheet as a template cant get the right total.
=SUMIF(C4:C12,"=khan",D4:D12)
=SUMIF(C4:C12,"=John",D4:D12)
what if some one who is using my template will use "harris" instead of
"khan". Is there any way if user enter the company name and formula
changes its value automatically.


  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

khan wrote:
I posted this type of question earlier but it has different nature.
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 etc). these companies are repeated 50 times in column
one.
I got my answer how to get sum for specific companies. Now the problem
is, I am asked to make a template so any one can use it. Problem is
these companies' name are not always same name, they could be
changed.In january there could be only 3 companies but in march they
could be any 13 companies' with different names. I can calculate total
and make it as a template only if I know which company is being used
but if some one else who does not know any thing abt excel formula and
using my sheet as a template cant get the right total.
=SUMIF(C4:C12,"=khan",D4:D12)
=SUMIF(C4:C12,"=John",D4:D12)
what if some one who is using my template will use "harris" instead of
"khan". Is there any way if user enter the company name and formula
changes its value automatically.


Instead of

=SUMIF(C4:C12,"=khan",D4:D12)

invoke:

=SUMIF($C$4:$C$12,E2,$D$4:$D$12)

where E2 is the cell the user either selects from or enters a company.
  #4   Report Post  
Ron Coderre
 
Posts: n/a
Default

One more thought:

Could you set up and Autofilter with a SUBTOTAL function above the data range?

That way users could select the company they want to see and the total for
that company would display above the list. There would be no special
training. Perhaps
just a note above the company list instructing the users to select a company.

--
Regards,
Ron

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
How to use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
How do I use the sumif if I have multiple criteria (i.e. greater . Kellyatisl Excel Worksheet Functions 3 June 4th 06 06:33 AM
Dynamic sumif function Jimbola Excel Worksheet Functions 5 May 4th 05 01:10 AM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM
SUM(IF( Array to avoid #NUM! values Elijah Excel Worksheet Functions 7 November 21st 04 02:17 PM


All times are GMT +1. The time now is 08:20 PM.

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

About Us

"It's about Microsoft Excel"