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
156 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 500 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 92

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now