Forum Discussion
Hogstad_Raadgivning
May 25, 2021Iron Contributor
Let function used with Index.
Hi, I try to figurer out how to use the new LET function, in this example wich has the same INDEX function several times. Is it possible, if yes, aht is the solution? Example file is at...
- May 25, 2021
Afraid that won't work without lambdas since required array of arrays. If only PeterBartholomew1 knows some trick.
JKPieterse
May 25, 2021Silver Contributor
You mean like this:
=LET(Found,INDEX(t_priser,,XMATCH(J11,t_priser[#Headers])),XLOOKUP(SMALL(Found,1),Found,Found))
=LET(Found,INDEX(t_priser,,XMATCH(J11,t_priser[#Headers])),XLOOKUP(SMALL(Found,1),Found,Found))
- mtarlerMay 25, 2021Silver ContributorJKPieterse, Can I ask what is the point of the second XLOOKUP in that equation is for?
XLOOKUP(SMALL(Found,1),Found,Found)
Doesn't that just find the smallest value then look it up in the same array and return that same value again? I guess I'm asking why SMALL(Found,1) wouldn't work.- JKPieterseMay 25, 2021Silver ContributorI honestly don't know, I simply converted the formula to leverage the LET function. I did wonder about that though.
- Hogstad_RaadgivningMay 25, 2021Iron ContributorSince I started. It was just to practice and learn mostly. Good observation, SMALL(found,1) will work perfect.
- Hogstad_RaadgivningMay 25, 2021Iron ContributorSurer did. Thank you, it worked perfect.
I was a bit to fast with "best reponse" here. Sorry.
Thank you.
Best regards
- Geir