Solved

Boxes on Hand

Posted on 2013-05-23
5
144 Views
Last Modified: 2013-10-14
I have an excel sheet that tracks the starting on hand balance of many inventory items and then remaining qty on hand as shipments are planned. I am trying to use this report to further evaluate how many total boxes we have on hand on any given day. Ideas how to format or calculate this? Current sheet is formatted like the following to remove all unnecesary information.

Activity Date  --  Remaining Qty On Hand  -- Calculated Boxes On Hand Remaining

This works good, but what I need is a way to summarize this report so that it adds the total of all boxes remaining on hand for all items and sorts by date. We also need it to add a value on hand even if there is no activity for a certain item on every single date.

Thanks!
0
Comment
Question by:cozmo_troll
[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
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:helpfinder
ID: 39191972
total of all boxes remaining should be possible to calculate in Pivot table.
but could you post some sample excel workbook to see exactly how it is with your data?
0
 

Author Comment

by:cozmo_troll
ID: 39192073
sample attached
SAMPLE.xlsx
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 39192107
I´ve created 3 Pivot tables, please check it at least one of them meet your needs
Copy-of-SAMPLE.xlsx
0
 

Author Comment

by:cozmo_troll
ID: 39192119
Thank you, but maybe I wasn't 100% clear. I need it to find the total of boxes on hand by model by day. If there is no activity on that day, that means that there is still the same number of boxes on hand as the end of the last day that there was activity.
0
 
LVL 81

Accepted Solution

by:
byundt earned 500 total points
ID: 39193128
I added a column to your raw data for the Quantity on hand at end of day with the formula:
=IF(COUNTIFS(A$2:A2,A2,B$2:B2,B2)=1,LOOKUP(2,1/(([Model]=[@Model])*([Activity Date]=[@[Activity Date]])),[Remaining Qty On Hand]),"")

I then turned that raw data into a Table named tbData and created a PivotTable from it on a new worksheet.

Using that PivotTable, I ran the following macro to produce your report:
Sub RunningInventory()
Dim PT As PivotTable
Dim rg As Range, rg1 As Range, rg2 As Range
With ActiveSheet
    Set rg = .PivotTables(1).TableRange1
End With
Set rg1 = rg.Offset(0, rg.Columns.Count + 2)
rg.Copy
rg1.PasteSpecial xlPasteValuesAndNumberFormats
Set rg2 = rg1.Offset(1, 0).Resize(rg1.Rows.Count - 1, rg1.Columns.Count)
On Error Resume Next
Set rg2 = rg2.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0
If Not rg2 Is Nothing Then
    rg2.FormulaR1C1 = "=SUM(R[-1]C)"
End If
End Sub

Open in new window

SAMPLE-4Q28137348.xlsm
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
NEED LOOK FOR NUM 23 29
Reference between list of ingredients and mixtures in Excel 4 30
EXCEL String-handling question ... 7 51
Error 1004 Excel 2013 11 13
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
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.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

734 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