Entered text value equals a number I specify in another cell

G

Guest

I am creating a mileage chart in which I would like to enter the locations
driven to as text in one cell. In the adjacent cell I woul d like the actual
miles of driving to automactically appear. I would then have the miles
totaled at the bottom of the miles column. I have all the possible driving
destinations and the mileage of each one, but do not know how to have the
mileage automatically entered in an adjacent cell. Thanks for any help or
ideas. Dave
 
J

JE McGimpsey

Say your destination and mileage were in Sheet2, columns A & B.

Then if you enter your destination in Sheet1, column A, you can retrieve
the mileage with


B2: =VLOOKUP(A2, Sheet1!A:B, 2, FALSE)
 
G

Guest

Thanks, JE, but I must be doing something wrong. I have entered the
destination A1 sheet 2 and entered the mileage in B1 sheet 2. I then enter
the destination in A1 sheet 1 and your formula in cell B1 sheet 1. The
result in B1 Sheet 1 is #N/A.
 
P

Peo Sjoblom

Try

=VLOOKUP(A1, Sheet2!A:B), 2, FALSE)






--
Regards,

Peo Sjoblom

(No private emails please)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top