Apr 09 2021 01:07 AM
I've already got a formula, it's almost efficient
Needs minor correction.
I've attached a sample file. It's self explanatory.
@Peter Bartholomew @Sergei Baklan
Apr 09 2021 02:17 AM
@Nishkarsh31 Suspected it to a rounding issue. Your formula included a factor 0.33. Changed it to ⅓. Then it seems to work.
Apr 09 2021 09:21 AM
Apr 09 2021 09:24 AM
Apr 09 2021 10:42 AM
Apr 09 2021 11:24 AM
Apr 09 2021 11:37 AM
Apr 09 2021 02:41 PM
SolutionI would recommend sticking with integers for this type of calculation in order to avoid rounding error problems altogether. In particular, the integer divide function QUOTIENT can be valuable when you want to group values.
= LET(
k, SEQUENCE(1,COLUMNS(Recipe),2),
MOD(QUOTIENT(k,3),2) )
Normally 'k' should be a zero-based index but here you want a two cell offset with only one opening zero.
Apr 10 2021 04:49 AM
Apr 10 2021 02:49 PM
Apr 09 2021 02:41 PM
SolutionI would recommend sticking with integers for this type of calculation in order to avoid rounding error problems altogether. In particular, the integer divide function QUOTIENT can be valuable when you want to group values.
= LET(
k, SEQUENCE(1,COLUMNS(Recipe),2),
MOD(QUOTIENT(k,3),2) )
Normally 'k' should be a zero-based index but here you want a two cell offset with only one opening zero.