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
166 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
[X]
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
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

749 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