Lookup question

  • Thread starter Thread starter Teched
  • Start date Start date
T

Teched

Good day,

Durango Mileage Log Sheet
2003



Total miles: Business Personal
Date Time Purpose of Trip Start End Miles Purpose
10/21/2003 10:00 AM Purchase Durango 221 235 14 Business
10/22/2003 10:00 AM Kids to school and daycare 235 #REF! #REF!
Business


Using the above worksheet, I would like Excel to AUTOMATICALLY insert the
"miles" and "purpose" value based on the Purpose of the trip.

For example: if the trip is "Kids to school and daycare" then Excel would
insert 34 for miles and Business for Purpose.


I think the "LOOKUP" function is the best way to go. But I am having trouble
getting it to work.
Also, there will be a different worksheet for each month. So is there a way
to store the LOOKUP values in a different file or worksheet that each
worksheet will go out and lookup the values?

Any help will be GREATLY appreciated.

I can be directly at (e-mail address removed)

Thanks ahead of time....
 
Hi
try the following
- set-up a new worksheet with your lookup values (lets call this sheet
'lookup'). It should look like the following
A B C
trip typ purpose miles
Kids to school Business 34
.....

Now if you enter the trip type in the cell A1 you can use VLOOKUP as
follows to get the purpose
=VLOOKUP(A1,'lookup'!$A$1:$C$20,2,0)

for the the miles use
=VLOOKUP(A1,'lookup'!$A$1:$C$20,3,0)

For more information about lookups have a look at
http://www.mvps.org/dmcritchie/excel/vlookup.htm
 
Back
Top