Convert Unit of Measure

Seanlasser

New Member
Joined
Nov 5, 2017
Messages
1
Hello


I need some help with either a formula or VBA macro to solve a conversion issue in a packaging table for tile. (Sample below) The challenge ahead of me is to convert all sales data to the same unit of measure so I can rank the number of pieces sold. the issue that makes this complicated is that there is a packaging table which affects all items, in total there are more than 150,000 lines and in the packaging table and items are not uniformly listed with conversion factors. This table is years of accumulation of many peoples efforts, therefore lies the struggle. for example, as you can see form the section below item 1 list the weight first and item 2 list the SF/CT and item 4 list PC/CT. the way you read this table is first the number factor (1of6) and then look for the units that match that number 1st U/M 1/6 / 2nd U/M 1/6 to get the full ratio. To get a full picture of how an item equates to other you would follow that logic thru 2nd, 3rd, etc. conversion factors. furthermore if a 12x24 tile is 2 SF per PC and a 4x4 tile is 0.111 SF per PC if I sold 10 SF of each item I really would have sold 5 PC of the tile that is 12x24 and 90 PCs of the one that is 4x4, so even though the total volume is the same the smaller tile is way more popular and I should have a lot more of them on hand...


[TABLE="width: 1216"]
<tbody>[TR]
[TD]ITEM CODE
[/TD]
[TD]AMT PER U/M ARRAY 1 OF 6
[/TD]
[TD]AMT PER U/M ARRAY 2 OF 6
[/TD]
[TD]AMT PER U/M ARRAY 3 OF 6
[/TD]
[TD]AMT PER U/M ARRAY 4 OF 6
[/TD]
[TD]AMT PER U/M ARRAY 5 OF 6
[/TD]
[TD]AMT PER U/M ARRAY 6 OF 6
[/TD]
[TD]1ST U/M 1 OF 6
[/TD]
[TD]1ST U/M 2 OF 6
[/TD]
[TD]1ST U/M 3 OF 6
[/TD]
[TD]1ST U/M 4 OF 6
[/TD]
[TD]1ST U/M 5 OF 6
[/TD]
[TD]1ST U/M 6 OF 6
[/TD]
[TD]2ND U/M 1 OF 6
[/TD]
[TD]2ND U/M 2 OF 6
[/TD]
[TD]2ND U/M 3 OF 6
[/TD]
[TD]2ND U/M 4 OF 6
[/TD]
[TD]2ND U/M 5 OF 6
[/TD]
[TD]2ND U/M 6 OF 6
[/TD]
[/TR]
[TR]
[TD]1
[/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]
[TD]PA
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]1
[/TD]
[TD]4
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]PC
[/TD]
[TD]LB
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]EA
[/TD]
[TD]PC
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Above is the packaging table as you can see there are 6 options for each item. SF= square feet, PC=piece, EA= each, PA=pallet, ETC...1 is always the weight (LB) and I am not concerned with that at this time. Ideally I would like to be able to apply some formula or VBA to the sales numbers below so that all items are represented in number of PC (pieces) from column 'J' (QTY Sold)


[TABLE="width: 1847"]
<tbody>[TR]
[TD]ITEM#
[/TD]
[TD]LOT#
[/TD]
[TD]ITEM DESCRIPTION
[/TD]
[TD]ITEM DESCRIPTION 2
[/TD]
[TD]WAREHOUSE
[/TD]
[TD]SALES FROM
[/TD]
[TD]SALES TO
[/TD]
[TD]DURATION
[/TD]
[TD]Wks/Mths
[/TD]
[TD]Qty Sold
[/TD]
[TD]Qty Returned
[/TD]
[TD]UOM
[/TD]
[TD]# OF INVOICES
[/TD]
[TD]AVERAGE USAGE
[/TD]
[TD]Per Wk or Mth
[/TD]
[TD]AVG # OF INVOICES
[/TD]
[TD]HIGHEST QTY SOLD
[/TD]
[TD]ACTIVITY QTY
[/TD]
[TD]Per Wk or Mth2
[/TD]
[TD]QTY ONHAND
[/TD]
[TD]UOM3
[/TD]
[TD]QTY ALLOCATED
[/TD]
[TD]QTY AVAILABLE
[/TD]
[TD]QTY SCHEDULED
[/TD]
[TD]NET AVAILABLE
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]SAM
[/TD]
[TD]10117
[/TD]
[TD]110317
[/TD]
[TD]43.29
[/TD]
[TD]WK
[/TD]
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
[/TD]
[TD][/TD]
[TD][/TD]
[TD]SAM
[/TD]
[TD]10117
[/TD]
[TD]110317
[/TD]
[TD]43.29
[/TD]
[TD]WK
[/TD]
[TD]78.24
[/TD]
[TD]0
[/TD]
[TD]SF
[/TD]
[TD]1
[/TD]
[TD]1.81
[/TD]
[TD]WK
[/TD]
[TD]0
[/TD]
[TD]78.24
[/TD]
[TD]78.24
[/TD]
[TD]1.81
[/TD]
[TD]0
[/TD]
[TD]SF
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[TD]0
[/TD]
[/TR]
[TR]
[TD]15
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]SAM
[/TD]
[TD]10117
[/TD]
[TD]110317
[/TD]
[TD]43.29
[/TD]
[TD]WK
[/TD]
[TD]37
[/TD]
[TD]0
[/TD]
[TD]PC
[/TD]
[TD]11
[/TD]
[TD]0.85
[/TD]
[TD]WK
[/TD]
[TD]0
[/TD]
[TD]13
[/TD]
[TD]37
[/TD]
[TD]0.85
[/TD]
[TD]37
[/TD]
[TD]PC
[/TD]
[TD]0
[/TD]
[TD]37
[/TD]
[TD]0
[/TD]
[TD]37
[/TD]
[/TR]
</tbody>[/TABLE]


I would be happy to fill in anything that I forgot or answer any questions for information that isn't clear.

Thank you in advance for your help.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,223,336
Messages
6,171,525
Members
452,409
Latest member
brychu

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