Notifications
Clear all
General Excel Questions & Answers
2
Posts
2
Users
0
Reactions
78
Views
Topic starter
I have a question about "Lamda".
I have a formula that works for taking data that is in a single column and sorting it into three columns. "Date", "Description", and "Amount". "=INDEX(A2:A22,SEQUENCE(ROWS(A2:A22)/3,3))".
When I try to create a Lamda function I get errors. I do not understand what I am doing wrong.
Can you tell me how to make this work?
Thank you.
Posted : 20/02/2022 12:04 pm
Hi Joseph,
Welcome to our forum!
Your LAMBDA version of the formula is not the same. Your INDEX is:
=INDEX(A2:A22,SEQUENCE(ROWS(A2:A22)/3,3))
And your LAMBDA is:
=LAMBDA(a,INDEX(a,SEQUENCE(ROW(a)/3,3))(A2:A22))
If you change your LAMBDA to:
=LAMBDA(a,INDEX(a,SEQUENCE(ROWS(a)/3,3))(A2:A22))
And define it as a name, you can then use it as expected. Note: it won't evaluate in the cell like so:
=LAMBDA(a,INDEX(a,SEQUENCE(ROWS(a)/3,3))(A2:A22))
You must define it as a name first.
Mynda
Posted : 20/02/2022 7:40 pm