Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I show a summary of part number and the shipped amounts as a summary in Excel?

Posted on 2014-10-24
5
Medium Priority
?
187 Views
Last Modified: 2014-10-24
Here is a sample of the source data in Excel.

PROD CODE      SHIP QTY
00001                        0.00
00001                        90.00
00001                        0.00
00002                        0.00
00003                        0.00
00003                        5.00
00003                        -5.00
00004                        0.00
00005                        0.00
00006                       58.00
etc...

I would like a macro or script which would open the Excel file, and show only the Total Shipped by Product.
Where there is a negative, is that should be deducted from the total amount for that particular Product.

The desired output would be something like this:

PROD CODE      SHIP QTY
00001                        90.00
00002                        90.00
00003                        0.00
00004                        0.00
00005                        0.00
00006                       58.00
etc...
0
Comment
Question by:100questions
  • 3
5 Comments
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 2000 total points
ID: 40402528
PivotTables!

Almost anytime you think "summarize", PivotTables are the solution.  

Just click any cell in your data, then select Menu: Insert tab, Tables section, PivotTable.  You'll see a dialog box and your entire data section will be selected (you'll see a marquee around it).  Click the "OK" button.

In your example, you'll then make "PROD CODE" a Row Label (click and drag it from the "Choose fields to add to report" to the "Row Labels" section.  Then make "SHIP QTY" a Value (click and drag it to the "Values" section).
pivot table example
See the example workbook with some additional data.


Regards,
-Glenn
EE-PTexample.xlsx
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 40402688
A PivotTable is definitely the best way to do this.  But don't just take Glenn's and my word for it:

https://www.youtube.com/watch?v=GwbSJFtRmDw

:)
0
 

Author Comment

by:100questions
ID: 40402701
Thanks however in my list it's not calculating correctly at all.
The Sum of the Ship Qty is no where that it should be close to.
Something is not working correctly.
0
 

Author Comment

by:100questions
ID: 40402710
I changed the summary to Sum instead of Count and it seems to work fine.
0
 

Author Closing Comment

by:100questions
ID: 40402711
Works very well, thank you.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question