“Weight”

Marwan69

Board Regular
Joined
Mar 14, 2018
Messages
80
Hi,

i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my formula also convers ml & g which I don’t want to be touched. For example: Any smaller unit/weight i want my formula to ignore. How can I incorporate this in my formula?

Many thanks.
 
Last edited:
So one option is to use a lookup table that tabulates the combinations of unit bases that are used in items purchased, as well as the conversion factor needed to convert to your preferred units. That table is built once and moved aside somewhere. You then populate the shaded cells and the formulas do the lookups to pull in the appropriate conversion factor...and the preferred units are automatically inserted to clarify what they are.
unitconv.xlsx
ABCDEFGHIJ
1Coffee BeansMonin Blue Ocean syrupMonin Pomergranate syrup Monin Vanilla syrupItem unit basis (as sold) (A)Conv factor (A/cf=B)Preferred Unit (B)
2Unit cost65575757kg1000g
3Item unit basis qty (as sold)11700700L1000mL
4Item unit basis (as sold) (A)kgLmLmLmL1mL
5Cost per preferred unit basis0.0650.0570.0814285710.081428571
6Preferred unit basis (B)gmLmLmL
Sheet1
Cell Formulas
RangeFormula
B5:E5B5=B2/B3/INDEX($I$2:$I$4,MATCH(B4,$H$2:$H$4,0))
B6:E6B6=INDEX($J$2:$J$4,MATCH(B4,$H$2:$H$4,0))
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Excellent...glad to help! Just add any other unit conversions to the lookup table and adjust the lookup range in the formula to handle anything new that comes along. Thanks for letting me know.
 
Upvote 0
Have you looked at the CONVERT function? One of its arguments is a string representation of the units.
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,580
Members
448,972
Latest member
Shantanu2024

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