Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default VBA solution required?

Hi;
I would like to know if there is a way to total items from one column from
different dept. numbers in another column. I will try to give an example
below:

Supplier Name Total Cost Dept. #

Acme 146.35 123456
ABC 1245.56 897654
DEFG 549.36 123456
BobCo 29.87 897654

I would like it to add all the totals from each department and have it list
below the same spreadsheet something like below:

Dept # 123456 $ 659.71
897654 $ 1275.43

I hope I have explained properly what I am looking for, and appreciate any help!

Mike

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default VBA solution required?

You should be able to do that with the Sumif function. Say your data table
is A1:C4, and the department numbers you want to sum by are in E1:E2. In F1,
you'd enter

=Sumif($C$1:$C$4,E1,$B$1:$B$4)

Then you could copy the formula down to F2.

Hope that helps.

--
Mike Lee
McKinney,TX USA


"Michael" wrote:

Hi;
I would like to know if there is a way to total items from one column from
different dept. numbers in another column. I will try to give an example
below:

Supplier Name Total Cost Dept. #

Acme 146.35 123456
ABC 1245.56 897654
DEFG 549.36 123456
BobCo 29.87 897654

I would like it to add all the totals from each department and have it list
below the same spreadsheet something like below:

Dept # 123456 $ 659.71
897654 $ 1275.43

I hope I have explained properly what I am looking for, and appreciate any help!

Mike

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default VBA solution required?

A pivot table will do that for you. On the data menu select Pivot Table and
follwo the wizard. Put your Departments in the left hand column and the
amounts in the data section. It will automatically create all of your totals
for you by department. You could also add supplier names and move things
around to suit. if you want to get fancy just add an autoformat and you will
get a very professional looking report...
--
HTH...

Jim Thomlinson


"Michael" wrote:

Hi;
I would like to know if there is a way to total items from one column from
different dept. numbers in another column. I will try to give an example
below:

Supplier Name Total Cost Dept. #

Acme 146.35 123456
ABC 1245.56 897654
DEFG 549.36 123456
BobCo 29.87 897654

I would like it to add all the totals from each department and have it list
below the same spreadsheet something like below:

Dept # 123456 $ 659.71
897654 $ 1275.43

I hope I have explained properly what I am looking for, and appreciate any help!

Mike

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
odd vlookup solution required - can you rise to the challenge?! Danny Bhoy Excel Programming 2 January 16th 08 09:21 AM
looking for a solution Joe Excel Worksheet Functions 1 December 13th 07 04:37 AM
best solution for db Nader Tewelde Excel Programming 0 July 9th 07 11:25 AM
Need a solution! drucey[_15_] Excel Programming 2 March 18th 06 09:12 PM
Solution Required to prevent #Ref! when rows deleted Andibevan Excel Worksheet Functions 3 September 6th 05 01:39 PM


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

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"