I would like to sum up columns but the columns to be summed up would be different in each row depending on a a cell in that row
e.g. in row 1, I want to sum up columns 1,2,3,4 but in row 2 I want to sum up 5,6,7,8,9,10,11 and 12
I have been provided the previous answer that works with a range
=BYROW(A2:M3,LAMBDA(α,SUM(CHOOSECOLS(DROP(α,,1),–TEXTSPLIT(TAKE(α,,1),”,”)))))
, but not an array:
=BYROW(FILTER($a$2:$m$3,$n$2:$n$5=”yes”),LAMBDA(α,SUM(CHOOSECOLS(DROP(α,,1),–TEXTSPLIT(TAKE(α,,1),”,”)))))
it seems to be taking the first referenced column in each case i.e. first and 5th respectively
andy leary is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.