Feb 22 2023 09:16 PM
Hello,
See the table below:
Sample lbs. gallons liters
1 | |||
2 | |||
3 |
I would like to create formulas to do unit conversions for the 3 values. Example: if I enter gallons for sample 1, create formulas in the adjacent lbs. and liters cells to convert the gallons value in sample 1to lbs. and liters.
However, I also want the ability to convert different entries in sample 1 for different units. Example: if I enter liters instead of gallons, the sample 1 cells also have the ability to convert to gallons and lbs.
Each of the cells allow a manual entry, does not matter which column it is and based on that entry, the other cells unit convert to the other cells units.
Thanks
Feb 23 2023 03:36 AM
How does one convert between a weight (lbs) and a volume (gallons and liters)?
And do you want to use UK gallons or US gallons?
Mar 01 2023 04:56 AM
Mar 01 2023 05:42 AM
This requires VBA. See the attached demo.
It is a macro-enabled workbook, so you'll have to allow macros when you open it.
To view the VBA code, right-click the sheet tab and select 'View Code' from the context menu.
Mar 01 2023 06:22 AM - edited Mar 01 2023 06:23 AM
Hello,
=CONVERT(1;"gal";"l") =3.78
For Water : =CONVERT(CONVERT(1;"gal";"l");"kg";"lbm")=8.345