Forum Discussion
complex formula creation
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
4 Replies
- HecatonchireIron Contributor
Hello,
=CONVERT(1;"gal";"l") =3.78
For Water : =CONVERT(CONVERT(1;"gal";"l");"kg";"lbm")=8.345
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?
- vibriotkoCopper Contributorus gallons.
water = 1 us gallons = 8.35 lbs.
water = 1 us gallons = 3.79 liters.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.