# How to calculate mileage from existing mileage table by inputting row/column values

1. ## How to calculate mileage from existing mileage table by inputting row/column values

Hello -

I want to create a spreadsheet in which I can input a value (y) in B,2 and a value (x) in B,3 ... where (y) is from the far left column of a corresponding table and (x) is from the top row of the same corresponding table ... and the output value (=) in B,4 will be the intersection of (x) and (y) in the referenced table.

Specifically, the referenced table is a mileage chart of known values (origins listed in left column, destinations listed on top row, distances between intersecting origins/destinations already listed in table). The worksheet will be a mileage report in which I can input in B,2 origin (y) "School A" and in B,3 destination (x) "School B", and auto-report the intersecting distance from table in B,3.

I've searched forums and google, but apparently am not searching with correct terms.

Thanks for any help

2. ## Re: How to calculate mileage from existing mileage table by inputting row/column values

depends how you want to do it but i think index and match would work just right. if you upload a book ill have you an answer in a jiffy lol

3. ## Re: How to calculate mileage from existing mileage table by inputting row/column values

Thanks for quick response. In quick exploration of Index & Match, I don't see how to pull from multiple cells on my formula sheet... I've uploaded a partial table for your exam. Thanks

Originally Posted by twiggywales
depends how you want to do it but i think index and match would work just right. if you upload a book ill have you an answer in a jiffy lol

4. ## Re: How to calculate mileage from existing mileage table by inputting row/column values

Have a look at that and see if its what you need

Mileage Calc Sample.xlsx

5. ## Re: How to calculate mileage from existing mileage table by inputting row/column values

twiggywales - Brilliant! I'd read a couple tutorials for index & match but they limited the match to row only (not column) and also did not indicate that there could be 2 matching criteria (row and column). Your example addressed the issue beautifully. Many Thanks!

6. ## Re: How to calculate mileage from existing mileage table by inputting row/column values

no problem, remember to mark the thread solved.

There are currently 1 users browsing this thread. (0 members and 1 guests)