Mass Unit Converter in Excel
0.001
Add-in Formula
=PO.UnitConverter(1, "g", "kg")
Excel Lambda
=LAMBDA(x,
LET(
ratio, 0.001,
x * ratio
)
)(1)
Category Lambda
=LAMBDA(x, from, to,
LET(
f, SWITCH(from,
"kg", 1,
"g", 0.001,
"mg", 1E-06,
"t", 1000,
"st", 6.35029318,
"lbm", 0.45359237,
"ozm", 0.028349523125,
"ozm[troy]", 0.0311034768,
"ton[UK]", 1016.0469088,
"ton[US]", 907.18474),
t, SWITCH(to,
"kg", 1,
"g", 0.001,
"mg", 1E-06,
"t", 1000,
"st", 6.35029318,
"lbm", 0.45359237,
"ozm", 0.028349523125,
"ozm[troy]", 0.0311034768,
"ton[UK]", 1016.0469088,
"ton[US]", 907.18474),
x * f / t
)
)(1, "g", "kg")
How to save as a reusable Excel function
LAMBDA is a built-in Excel feature (Microsoft 365) that lets you create custom functions without VBA. The formulas above work as-is when pasted into a cell.
To save a LAMBDA as a reusable named function:
- Go to Formulas → Name Manager → New
- Enter a name, e.g.
ConvertMass - In Refers to, paste the LAMBDA formula without the trailing invocation
(...) - Click OK
Now use =ConvertMass(1, "g", "kg")
anywhere in your workbook — no add-in required.
Conversion Factors (base: kg)
| Unit | Name | Factor |
|---|---|---|
| kg | kilogram | 1 |
| g | gram | 0.001 |
| mg | milligram | 1E-06 |
| t | tonne | 1000 |
| st | stone | 6.35029318 |
| lbm | pound-mass | 0.45359237 |
| ozm | ounce-mass | 0.028349523125 |
| ozm[troy] | troy ounce-mass | 0.0311034768 |
| ton[UK] | UK ton-mass | 1016.0469088 |
| ton[US] | US ton-mass | 907.18474 |