#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default How Do I

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.

--

Regards
Michael Koerner



  #2   Report Post  
Posted to microsoft.public.excel.programming
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default How Do I

Use VLOOKUP.

In col E use : =VLOOKUP(D1,Routes!A:C,2,0)
In col F use : =VLOOKUP(D1,Routes!A:C,3,0)

If this helps, please click "Yes"
<<<<<<<<<<<<


"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.

--

Regards
Michael Koerner



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default How Do I

Hi,

With the route number in D1, put this in E1 and drag left into F1. You can
also drag it down to display more diestances for other routes in column D

=IF(D1<"",VLOOKUP($D1,Routes!$A$1:$C$10,COLUMN(B2 ),FALSE),"")

Mike

"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.

--

Regards
Michael Koerner



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default How Do I

Thank you all. this is just great.

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
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.

--

Regards
Michael Koerner






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default How Do I

After trying the suggestions All I got in Col E and F were the words
Kilometer and Miles. I neglected to say in my intial post that there is a
header row in both sheets.

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
Thank you all. this is just great.

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
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.

--

Regards
Michael Koerner





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 164
Default How Do I

I figured it out. Again, thanks to everyone.

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
After trying the suggestions All I got in Col E and F were the words
Kilometer and Miles. I neglected to say in my intial post that there is a
header row in both sheets.

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
Thank you all. this is just great.

--

Regards
Michael Koerner


"Michael Koerner" wrote in message
...
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.

--

Regards
Michael Koerner






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"