Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
164 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

837 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