Combine Item Usage Based on item, year and Month

jsharpe

New Member
Joined
Jun 6, 2024
Messages
7
Office Version
  1. 365
Platform
  1. Windows
HI All,
I have been trying to figure out a formula to combine column I for the same items in (C) that have the same month (f) and year (e). I need to pull this data into another spread sheet so it would have the item # (c), Use Month(F), Use Year (E), and Actual Usage (I) in separate columns, I attached the header for this sheet below. I just need to get this data usage combined properly then I can pull into the other workbook using xlookup. Thanks for the help.


1717682412111.png






other spread sheet data needs to be pulled into
1717682976593.png
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I cannot manipulate data in a picture. Please reload the same data to this site using XL2BB.
 
Upvote 0
I installed XL2bb but the trust center is telling me its from an untrusted source and will not allow me to enable it.
 
Upvote 0
original file
Item Usage by Warehouse.xlsx
ABCDEFGHI
1companywarehouseitem_numusage_dateuse_yearuse_monthuse_dayqual_usageact_usage
20101037139812/8/201920192822
30101 MSF1436007 10/18/2018201810181010
40101#1-25 5/18/2020202051833
50101#1-25 4/12/2021202141211
IC_USAGE_BY_WAREHOUSE




Below is the workbook I am trying to pull the data into

ItemHistory_MapFile-V.xlsx
ABCDEFGH
1Required: I-AI-BI-CI-DI-EI-FI-GI-H
2Company IDLocation IDItem IDYear for Demand PeriodDemand PeriodActual UsageNumber of OrdersScheduled Usage
301010371398120192#VALUE!
40101 MSF1436007 201810
50101#1-25 20205
60101#1-25 20214
70101#25HOOKS2 20189
80101#25HOOKS2 20221
Item History
Cell Formulas
RangeFormula
C3:C102948C3='\\APPSVR1\DataConversionFiles\Export\Inventory\Item Usage by Warehouse.xlsx'!IC_USAGE_BY_WAREHOUSE[item_num]
D3:D102948D3='\\APPSVR1\DataConversionFiles\Export\Inventory\Item Usage by Warehouse.xlsx'!IC_USAGE_BY_WAREHOUSE[use_year]
F3F3=XLOOKUP(C3&D3&E3,'\\APPSVR1\DataConversionFiles\Export\Inventory\[Item Usage by Warehouse.xlsx]IC_USAGE_BY_WAREHOUSE'!$C:$C&'\\APPSVR1\DataConversionFiles\Export\Inventory\[Item Usage by Warehouse.xlsx]IC_USAGE_BY_WAREHOUSE'!$E:$E&'\\APPSVR1\DataConversionFiles\Export\Inventory\[Item Usage by Warehouse.xlsx]IC_USAGE_BY_WAREHOUSE'!$F:$F,SUM('\\APPSVR1\DataConversionFiles\Export\Inventory\[Item Usage by Warehouse.xlsx]IC_USAGE_BY_WAREHOUSE'!$I:$I))
E3:E8E3=XLOOKUP(C3&D3,'\\APPSVR1\DataConversionFiles\Export\Inventory\[Item Usage by Warehouse.xlsx]IC_USAGE_BY_WAREHOUSE'!$C:$C&'\\APPSVR1\DataConversionFiles\Export\Inventory\[Item Usage by Warehouse.xlsx]IC_USAGE_BY_WAREHOUSE'!$E:$E,TEXT('\\APPSVR1\DataConversionFiles\Export\Inventory\[Item Usage by Warehouse.xlsx]IC_USAGE_BY_WAREHOUSE'!$D:$D,"m"))
Dynamic array formulas.
 
Upvote 0
Here is a power query solution

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"usage_date", type date}}),
    #"Grouped Rows" = Table.Group(#"Changed Type", {"item_num", "use_year", "use_month"}, {{"Total Usage", each List.Sum([act_usage]), type number}})
in
    #"Grouped Rows"

When you close and load from the PQ Editor, you select where you want the query to go.
 
Upvote 0
Solution
Hi, thanks for the above solution it worked great. took a little to figure out since I had never used power query editor. Do you happen to know if their is a button in power query editor menu to use to limit the length of characters in a column? I currently use a TRIM formula to do this for each column.
 
Upvote 0
Not quite yet still trying to figure this out. below is an example of the workbooks im working on. you will see in row 4 that it has the max length of each column. is there a way to trim the length of each column easier than doing 1 column at a time?

orderquoteline-QUOTES.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMAN
1Import Set NumberLine NoItem IDUnit QuantityUnit of MeasureUnit PriceExtended DescriptionSource Location IDShip Location IDProduct Group IDSupplier IDSupplier NameRequired DateExpedite DateWill CallTax ItemOK to InterchangePricing UnitCommission CostOther CostPO CostDispositionScheduledManual Price OverrideCommission Cost EditedOther Cost EditedCapture UsageTag and Hold Class IDContract Bin IDContract No.Allocation QtyPromise DateRevision LevelResolve Item ContractSampleQuote Line No.Quote CompleteItem DescriptionInvoice No.Line No
2AlphanumericNumericAlphanumericNumericAlphanumericNumeric, DecimalAlphanumericNumericNumericAlphanumericNumericAlphanumericDate TimeDate TimeAlphanumericAlphanumericAlphanumericAlphanumericNumeric, DecimalNumeric, DecimalNumeric, DecimalAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericNumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericAlphanumericNumeric
3RequiredRequiredRequiredRequiredRequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredRequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot RequiredNot Required
4894010819,425599895088111819,419,419,4111111888148201114089
510041UB40 SEAL30CASE15.046UB40 Seals100016100016METER100411Tight Seal11/15/199911/13/1999Y - Yes N - NoY - Yes N - NoY - Yes N - NoCASE3.0470.560.32B - Backorder D - Direct ship S - Special H - Hold C - Cancel T - TransferY - Yes N - NoY - Yes N - NoY - Yes N - NoY - Yes N - NoY - Yes N - NoRough In2341223452412/12/20071AY - Yes N - NoY - Yes N - NoY - Yes N - NoCopper Tube – 12 Ft1273451
Sheet1
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top