Thread: How Do I
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default How Do I

On Sun, 25 Oct 2009 10:04:03 -0400, "Michael Koerner"
wrote:

I have a workbook that tracks my walking program. Sheet 2 named Routes
contains all the routes that I use for my runs.Col A contains the route
number. Col B & C contains the distance for that route in Kilometres and
miles. Col D contains the description of the route.

I would like in Sheet 1 (Current Year) to be able to insert the route number
in Col D and have the distance for that route in Kilometres and miles show
up in Col E & F.

Any help is greatly appreciated.


Assuming the route numbers are sorted, try the following formulas.

In cell E1: =VLOOKUP(D1,Routes!A$1:B$100,2)
In cell F1: =VLOOKUP(D1,Routes!A$1:C$100,3)

If the route numbers are NOT sorted you have to use

In cell E1: =VLOOKUP(D1,Routes!A$1:B$100,2.FALSE)
In cell F1: =VLOOKUP(D1,Routes!A$1:C$100,3,FALSE)


Change the 100 to fit the size of your data in sheets Routes.
Copy cells E1:F1 down as far as you have data in column D.

Hope this helps / Lars-Åke