ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Setting up a worksheet (https://www.excelbanter.com/excel-worksheet-functions/166067-setting-up-worksheet.html)

Setting a Mileage Expense Report

Setting up a worksheet
 
I want to be able to type in a name in 1 cell and another name in another
cell and then it give me a number... example

C7= BTGH
F7= HH
and the result is 3

this is for a mileage expense report that we just want to be able to type in
the locations of each and then it gives us back the mileage amounts.

sometimes the information may be...
C7 = HH
F7=BTGH
and the result is still 3

there are a lot of other locations that need to be added, i think i just
need help starting ...

thanks

Gary''s Student

Setting up a worksheet
 
You need a VLOOKUP() table. For example in columns AB and AB and AC and AD:

In AA the start
In AB the destination
In AC the formula:
=AA1 & AB1
In AD the mileage

For example:

London Paris LondonParis 20
Paris London ParisLondon 20
London Madrid LondonMadrid 30
Madrid London MadridLondon 30

then
=VLOOKUP(C7 & F7,$AC$1:$AD$20,2)
will lookup the mileage from the table.
--
Gary''s Student - gsnu200755


"Setting a Mileage Expense Report" wrote:

I want to be able to type in a name in 1 cell and another name in another
cell and then it give me a number... example

C7= BTGH
F7= HH
and the result is 3

this is for a mileage expense report that we just want to be able to type in
the locations of each and then it gives us back the mileage amounts.

sometimes the information may be...
C7 = HH
F7=BTGH
and the result is still 3

there are a lot of other locations that need to be added, i think i just
need help starting ...

thanks



All times are GMT +1. The time now is 05:38 PM.

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