ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Matrix (https://www.excelbanter.com/excel-discussion-misc-queries/40381-matrix.html)

Attempt at solving a Matrix Problem?

Matrix
 
I have a matrix, lets say 10 down and 10 across. I want to be able to type
lets say one through 10 in one cell from the column, and then one through 10
in another cell from the across column, and I want the 3rd cell to give me
the intersection of those two cells.. So for example, the matrix looks like
this..
1 2 3
1 5 10 5
2 7 8 9
3 4 3 2

and when I type 2 in the first cell and 3 in the next cell I want the result
to be 9!

Thank you all for helping me..
Eyad

RagDyeR

With your example data list in A1:D4,
And you type the 2 in E1,
And you type the 3 in E2,

Try this:

=INDEX(A1:D4,MATCH(E1,A1:A4,0),MATCH(E2,A1:D1,0))

To return the 9.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"Attempt at solving a Matrix Problem?" <Attempt at solving a Matrix
wrote in message
...
I have a matrix, lets say 10 down and 10 across. I want to be able to type
lets say one through 10 in one cell from the column, and then one through 10
in another cell from the across column, and I want the 3rd cell to give me
the intersection of those two cells.. So for example, the matrix looks like
this..
1 2 3
1 5 10 5
2 7 8 9
3 4 3 2

and when I type 2 in the first cell and 3 in the next cell I want the result
to be 9!

Thank you all for helping me..
Eyad



Aladin Akyurek

Let A1:D4 house the sample, with A1 empty.

If B1:D1 and A2:A4 are in ascending order:

=INDEX($B$2:$D$4,MATCH(2,$A$2:$A$4,1),MATCH(3,$B$1 :$D$1,1))

would return 9.

If the sort order cannot be met, change the match-type of 1 to 0 in the
MATCH bits.

Attempt at solving a Matrix Problem? wrote:
I have a matrix, lets say 10 down and 10 across. I want to be able to type
lets say one through 10 in one cell from the column, and then one through 10
in another cell from the across column, and I want the 3rd cell to give me
the intersection of those two cells.. So for example, the matrix looks like
this..
1 2 3
1 5 10 5
2 7 8 9
3 4 3 2

and when I type 2 in the first cell and 3 in the next cell I want the result
to be 9!

Thank you all for helping me..
Eyad


--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.


All times are GMT +1. The time now is 09:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com