Cartesian Coordinates Lookup Formula

shdawson

Active Member
Joined
Jan 6, 2007
Messages
381
Hi,


I am writing with a lookup question, please.

I converted to Linux and Libre Office about eight years ago. Libre Office does not have all of the features found in Microsoft Office, but it also does not have nearly as many liabilities that were causing me interoperability problems with global customers. It works for me.

I am working on an extensive reporting effort. I am down to some of the final steps to complete the report presentation. This reporting effort intends to render the processed data in an X and Y graph format. I have logic going where many numbers are measured and presented in Cartesian format.

Cartesian coordinate system - Wikipedia

I am down to figure out the needed lookup formula. I come to you guys for help because I am not sure how to write the formula.

XL2BB - Excel Range to BBCode
I would use the XL2BB feature, but this feature does not work in Linux. Attached is a screen snip of my thinking. Here is the URL of my spreadsheet, should you wish to review the spreadsheet.

http://shdawson.com/test/MapLookup.ods

You can see I have a horizontal axis and a vertical axis, each with increments of 1 through 10, with each increment having its row. I am thinking of feeding the Cartesian coordinates to the formula, and the formula returns the grid location I have assigned.

LOGIC EXAMPLE:
HORIZONTAL value is 2, which is the contents of cell D12.
VERTICAL value is 3, which is the contents of cell B9.
FORMULA RETURNS 22, which is the contents of cell D9.

I can live with changing the grid locations of 1 through 100. I used these entries as it seemed like the most effective way to proceed.

QUESTIONS:
What spreadsheet formula will return 22 when I feed it HORIZONTAL of 2 and VERTICAL of 3 for the cell range of B2 through L12, please?

Is there a mathematical element in Cartesian coordinates that escapes me now that I should be using?


Thank You,
-SHD
 

Attachments

  • map.png
    map.png
    50.4 KB · Views: 21

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I don't have Libre Office, so I can't say if this will work for you or not. But in Excel, you can do what you want with an INDEX/MATCH/MATCH formula:

Book2
ABCDEFGHIJKL
1
210919293949596979899100
3981828384858687888990
4871727374757677787980
5761626364656667686970
6651525354555657585960
7541424344454647484950
8431323334353637383940
9321222324252627282930
10211121314151617181920
11112345678910
12012345678910
13
14hor2
15ver3
16intersection22
17Formula22
Sheet9
Cell Formulas
RangeFormula
B16B16=INDEX($C$2:$L$11,MATCH(B15,$B$2:$B$11,0),MATCH(B14,$C$12:$L$12,0))
B17B17=(B15-1)*10+B14


I assume your table is just an example, but if that is your actual data, you can replicate it with a simple formula, like B17.
 
Upvote 0
Solution
To do a lookup in a grid using two values you use a combination of INDEX and MATCH. This formula will work for the image you pasted. The link to your ODS file is not secure and I don't think Excel will open it anyway,

Excel Formula:
=INDEX(C2:L11,MATCH(A1,$B$2:$B$11,0),MATCH(B1,$C$12:$L$12,0))

where A1 has the VERTICAL number (determines the row) and B1 has the HORIZONTAL number (determines the column)
 
Upvote 0
I don't have Libre Office, so I can't say if this will work for you or not. But in Excel, you can do what you want with an INDEX/MATCH/MATCH formula:
@Eric W, Both Excel functions exist in Libre Office for Windows, and the formulas work exactly the same to return the necessary result.

@shdawson - does it also work in Linux?
 
Upvote 0
I thank you both.

The formula:
Excel Formula:
=INDEX($C$2:$L$11,MATCH(B15,$B$2:$B$11,0),MATCH(B14,$C$12:$L$12,0))

works great. I also allows me to play with the cell contents for deciding on a unique idenfifer.

Much Appreciated,
-SHD
@Eric W, Both Excel functions exist in Libre Office for Windows, and the formulas work exactly the same to return the necessary result.

@shdawson - does it also work in Linux?
Yes, it works in Libre Calc in Linux.
 
Upvote 0
works great. I also allows me to play with the cell contents for deciding on a unique idenfifer.

Much Appreciated,

Great to hear that! Libre Office has a very powerful spreadsheet software as I can see.

Just a quick reminder: We recently activated the "Mark as Solution" feature on the board. Could you please click on the little checkmark icon right next to the post which helped you to solve your question? Therefore the future visitors who might have the same question would know this one has a working solution? You can even do that for your old questions since it is a backward-compatible feature. Thanks for your help!
 
Upvote 0
@shdawson, Thanks for the feedback, but that would be great if the actual answer post is marked :) You marked my comment as the answer. Therefore, I just switched the marked answer to be the first answer above by also looking at your previous comment. Just FYI.

Thanks again for your help.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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