Skip to content

Instantly share code, notes, and snippets.

@Dinir
Last active February 18, 2023 05:47
Show Gist options
  • Save Dinir/a16b3d5c2d97c46ad0f30eab42e514a2 to your computer and use it in GitHub Desktop.
Save Dinir/a16b3d5c2d97c46ad0f30eab42e514a2 to your computer and use it in GitHub Desktop.
for Google Sheets
=if(unit_index=unit_display_index,
fe_value,
if(unit_index=1,
let(
fe_value_in_kpl, 100/fe_value,
if(unit_display_index=2,
fe_value_in_kpl*KPLinMPGus,
if(unit_display_index=3,
fe_value_in_kpl*KPLinMPGi,
fe_value_in_kpl
)
)
),
if(unit_index=2,
let(
fe_value_in_kpl, fe_value/KPLinMPGus,
if(unit_display_index=1,
100/fe_value_in_kpl,
if(unit_display_index=3,
fe_value*MPGusinMPGi,
fe_value_in_kpl
)
)
),
if(unit_index=3,
let(
fe_value_in_kpl, fe_value/KPLinMPGi,
if(unit_display_index=1,
100/fe_value_in_kpl,
if(unit_display_index=2,
fe_value/MPGusinMPGi,
fe_value_in_kpl
)
)
),
if(unit_display_index=1,
100/fe_value,
fe_value*if(unit_display_index=2,
KPLinMPGus,
KPLinMPGi
)
)
)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment