Sep 16 2022 07:47 PM
There may well be a simple solution to this, but I've search far and wide and can't find how Excel can achieve this outcome.
I have an array of numbers stored in A1:G10.
I'm trying to retrieve the contents of a single cell where the row and column values are generated automatically.
For example if I generate a Row value of one (3) and a Column value of four (4) I'd like to retrieve the data from cell D3.
Hope that makes sense, and thank you for any insights.
Rod
Sep 16 2022 09:40 PM
Solution@Rod_Sims The basic formula would look like this:
=INDEX(A1:G10,3,4)
where you can replace the 3 and 4 with references to cells that contain these numbers.
Sep 17 2022 08:19 AM
Thank you so much - an elegant and simple solution to what I had thought might be more complex. I've got my formulas working. Again, thank you!
Sep 17 2022 08:35 AM - edited Sep 17 2022 08:44 AM
For your amusement, something I occasionally do is to wrap the INDEX function within a Lambda function to create a more conventional programming syntax
Worksheet formulae
= MyArray(3,4)
= MyArray(3, )
= MyArray( ,4)
= MyArray( )
MyArray
= LAMBDA([r], [c],
INDEX(Sheet1!$A$1:$G$10, r, c)
);
Sep 16 2022 09:40 PM
Solution@Rod_Sims The basic formula would look like this:
=INDEX(A1:G10,3,4)
where you can replace the 3 and 4 with references to cells that contain these numbers.