Enter numbers and x, y axis

arthurz11

Board Regular
Joined
Nov 9, 2007
Messages
162
Office Version
  1. 2021
Platform
  1. Windows
Would you please be so kind as to show me how to create a formula in Cell F3 after entering any (x,y) coordinates from range B2:D4 and then it will automatically display the corresponding number in Cell F4?

Also, vice versa, how to create a formula in Cell F7 and enter any numbers from range B6:D8 and automatically display the corresponding (x,y) coordinates in Cell F8?

Please note: Using MS Office 365. The (x,y) coordinates in range B2:D4 corresponds to the numbers in range B6:D8

I just made it 3x3 to make it easier
to understand what I needed to be done. Thanks!

Please view the following data:

Range B2:D4
[1,1] [0,1] [1,1] Example: x, y coordinates
[-1,0] [0,0] [1,0] Cell F3 →[0,1] ENTER X,Y
[-1,-1] [0,-1] [1,-1]Cell F4 →[7] RESULTS

Range B6:D8
[5] [7] [6] Example: numbers
[8] [2] [3] Cell F7 →[0] ENTER #
[0] [1] [7] Cell F8 →[-1,-1] RESULTS
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
In what I am trying to do is that I have to create the problem differently because I need to use two cells for x,y coordinates instead of one cell as you previously helped. The objective is to enter the x,y coordinates in cells H2 and I2 and it displays the corresponding value 7 in cell I4. This is the following DATA:

cell A1 is -1---cell B1 is 1---cell C1 is 0---cell D1 is 1---cell E1 is 1---cell F1 is 1
cell A1 is -1---cell B1 is 0---cell C1 is 0---cell D1 is 1---cell E1 is 1---cell F1 is 0
cell A1 is -1---cell B1 is -1---cell C1 is 0---cell D1 is -1---cell E1 is 1---cell F1 is -11

cell A5 is 1---cell B5 is 2---cell C5 is 3
cell A6 is 4---cell B6 is 5---cell C6 is 6
cell A7 is 7---cell B7 is 8---cell C7 is 9

In cell H2 I enter the -1 and in cell I2 I enter -1 (This is the x,y coordinates that I entered)

In cell I4 the formula finds the number and displays the 7
1 2 3
4 5 6
7 8 9

I want to input the x,y coordinates in two cells H2 and I2 in stead of one as previously. So on this one I have cells H2 and I2.
The formula in cell I2 automatically puts the assigned perspective value.
 
Upvote 0
Oops! I had to correct the data. Sorry. Her is the corrected one.

Range: A1:F3 graph:
cell A1 is -1---cell B1 is 1---cell C1 is 0---cell D1 is 1---cell E1 is 1---cell F1 is 1
cell A2 is -1---cell B2 is 0---cell C2 is 0---cell D2 is 1---cell E2 is 1---cell F2 is 0
cell A3 is -1---cell B3 is -1---cell C3 is 0---cell D3 is -1---cell E3 is 1---cell F3 is -11

Range: A5:C7
cell A5 is 1---cell B5 is 2---cell C5 is 3
cell A6 is 4---cell B6 is 5---cell C6 is 6
cell A7 is 7---cell B7 is 8---cell C7 is 9
 
Upvote 0
Thinking of too many numbers is like having a bouncy ball inside my head. Sorry. Nope, my error. D2 is 0. You have a keen eye. Thanks for catching that.
 
Upvote 0
Maybe something like this (i've created two formulas, Row and Column, to make things easier)


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][td="bgcolor: #DCE6F1"]
H
[/td][td="bgcolor: #DCE6F1"]
I
[/td][td="bgcolor: #DCE6F1"]
J
[/td][td="bgcolor: #DCE6F1"]
K
[/td][td="bgcolor: #DCE6F1"]
L
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
-1​
[/td][td]
1​
[/td][td]
0​
[/td][td]
1​
[/td][td]
1​
[/td][td]
1​
[/td][td][/td][td]
x​
[/td][td]
y​
[/td][td]
Row​
[/td][td]
Column​
[/td][td]
Result​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
1​
[/td][td]
0​
[/td][td]
0​
[/td][td]
0​
[/td][td]
1​
[/td][td]
0​
[/td][td][/td][td]
-1​
[/td][td]
-1​
[/td][td]
3​
[/td][td]
1​
[/td][td]
7​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
-1​
[/td][td]
-1​
[/td][td]
0​
[/td][td]
-1​
[/td][td]
1​
[/td][td]
-1​
[/td][td][/td][td]
0​
[/td][td]
1​
[/td][td]
1​
[/td][td]
2​
[/td][td]
2​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td]
1​
[/td][td]
1​
[/td][td]
1​
[/td][td]
3​
[/td][td]
3​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
1​
[/td][td]
2​
[/td][td]
3​
[/td][td][/td][td][/td][td][/td][td][/td][td]
0​
[/td][td]
0​
[/td][td]
2​
[/td][td]
2​
[/td][td]
5​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
4​
[/td][td]
5​
[/td][td]
6​
[/td][td][/td][td][/td][td][/td][td][/td][td]
1​
[/td][td]
-1​
[/td][td]
3​
[/td][td]
3​
[/td][td]
9​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
7
[/td][td]
7​
[/td][td]
8​
[/td][td]
9​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Coordinates (x,y) in columns H:I

Formula in J2 copied down
=IFERROR(AGGREGATE(14,6,(ROW($A$1:$E$3)-ROW($A$1)+1)/(($A$1:$E$3=H2)*($B$1:$F$3=I2)*(MOD(COLUMN($A$1:$E$3)-COLUMN($A$1)+1,2)=1)),1),"Not found")

Formula in K2 copied down
=IFERROR(AGGREGATE(14,6,(COLUMN($A$1:$E$3)-COLUMN($A$1)+2)/(($A$1:$E$3=H2)*($B$1:$F$3=I2)*(MOD(COLUMN($A$1:$E$3)-COLUMN($A$1)+1,2)=1)),1)/2,"Not Found")

Formula in L2 copied down
=IF(COUNT(I2:J2)=2,INDEX($A$5:$C$7,J2,K2),"Not found")

M.
 
Upvote 0

Forum statistics

Threads
1,223,707
Messages
6,174,000
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top