=LAMBDA(a,
LET(Range,IF(COLUMNS(a#)>1,a#,OFFSET(a,0,0,1,14)),
Range))(Q339)
The above formula is going to be used at many places. I need to eliminate OFFSET function to improve on speed. If target cell "a" is a spilling range then that range will be used, else the formula should return a range starting from target cell "a" to next 14 columns of that row.
=LAMBDA(a,
LET(Range,IF(COLUMNS(a#)>1,a#,OFFSET(a,0,0,1,14)),
Range))(Q339)
The above formula is going to be used at many places. I need to eliminate OFFSET function to improve on speed. If target cell "a" is a spilling range then that range will be used, else the formula should return a range starting from target cell "a" to next 14 columns of that row.
Share Improve this question edited Mar 19 at 13:55 Mayukh Bhattacharya 27.8k9 gold badges29 silver badges42 bronze badges asked Mar 19 at 12:22 Deepak SugandhiDeepak Sugandhi 233 bronze badges 2 |1 Answer
Reset to default 2Use INDEX:
=LAMBDA(a,
LET(Range,IF(COLUMNS(a#)>1,a#,a:INDEX(A1:ZZ10000,ROW(a),COLUMN(a)+13)),
Range))(Q339)
The A1:ZZ10000
is a range large enough to encompass any references expected. The main thing is that it only works if the first reference is A1
. The Second "end" reference can be anything to encompass the full field of choices.
a
is a spill range? – P.b Commented Mar 19 at 14:54