Hi All!
I’m hoping someone can help me… I’ve been working on creating a different way of allocating interest inventory for my company… It took a long time but I’ve finally got the old way to tie in to the new way…
Yahoo!!! I’m balanced!!!
What I need from you is to know if… I have added 2 or more levels of Subtotals on a sheet… By Currency, then Dept, etc… and another sheet with different levels of Subtotals… Can I, in code, create a new table on a third sheet that uses the different subtotal levels to compare/balance…
What I mean is… I hit the button I created and code runs that drags in the records I want and then adds the levels of subtotals…
Now I’d like to go to a third sheet and list the currencies, depts, etc, and bring in subtotal data from the other sheets to compare and show balanced…
In code can I say something like…
Find Sheet1’s Canadian Currency section, Dept 001’s Total and put it here… Next to it put Sheet2’s Canadian Currency section Dept 001’s Total… etc…
I’m sorry… I don’t think I’m making sense….
Okay… Let’s try this… The code below makes the subtotals after the new data is updated… (It works, but please feel free to edit this if I’m doing something silly…)
Range(“A2”).Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(5, 6, 7, 8, 9, 10), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True
Range(“B2”).Select
Selection.Subtotal GroupBy:=2, Function:=xlSum, TotalList:=Array(5, 6, 7, 8, 9, 10), _
Replace:=False, PageBreaks:=False, SummaryBelowData:=True
Can I now use something like Sheet3, Cell(whatever) = Selection.Subtotal Group1?… or do I have to search for the lines with the words “Dept 001 Total”, etc and offset to the right column?
in Advance for any ideas!!!