Hello, I am working on a spreadsheet in Calc, and need to calculate a field based on the option selected in a Dropdown.
The idea is to have a list of devices, their wattage, and calculate the Amperage based on their type.
I have created a Named Range called “Buss”
“LiFePo4”
“USB”
“Alternator”
Each of these will have a voltage supplied on the column next to it,
IE,
A | B
“LiFePo4” | 13.8
“USB” | 5
and so on.
the table will have this layout (in csv here). I am using the “Buss” range for the options in the final column.
Device,Watts,Amps,Buss
HAM Radio, 50, =Sum(B2*volts), LiFePo4
I want to make the equation conditional based on the option selected in the Buss field. I want the voltages for each buss to be editable, so more busses can be added, or voltages can be managed (changing the Lithium Battery size for example)
so something along the lines of
=SUM(nX*(SelectedBuss Voltage))
I guess I have two main issues here.
- How can I associate the voltage to the Buss name in the control.
- How can I calculate the Amperage based on the selected Buss
I suppose I could write it in VB (is that a thing with Libre?)
but I figured there should be an easier way to go about it…
Any advice greatly appreciated!
Cheers!