Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
MnO
 
Posts: n/a
Default Use info in separate table file


I have a work sheet called "Transports" in this format:

Nr Weight Destination Distance TrspType
212 78 Brazil xxx Air
233 199 Norway xxx Car
167 23 Spain xxx Boat
...

and further like this for about 500 rows.

Now I´m going to use this information to make a environmental
report and need to add information about the distance. I have a table
called "Distances" with all destination country distances available
that look like this:

Country Distance(km)
Austria 1200
Brazil 11000
Chile 12000
Norway 700
Spain 2400
... (templates)

The table is now in a separate file, but it´s ofcourse easy to
move it to a own sheet in the calculating file.

Question: How do I make Excel to read the Country column in the
"Transport" file and then add the numbers from the "Distances" table
into the empty distance column in the "Transport" worksheet.

Described in simple words I want Excel to do this: Read for each line
the destination country, and then look into the distance table to fill
the column for distances with the correct number.


--
MnO
------------------------------------------------------------------------
MnO's Profile: http://www.excelforum.com/member.php...o&userid=29672
View this thread: http://www.excelforum.com/showthread...hreadid=506780

  #2   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Use info in separate table file

Assuming your data in Transport start from A1 (header). Thus your first
formula goes to D2. Further assuming that the Distances table is in
sheet Distances, columns A:B in the same workbook (create a new sheet
and copy if necessary). Then in D2:

=VLOOKUP(C2, Distances!A:B, 2, 0)

Copy down as far as necessary.

HTH
Kostis Vezerides

  #3   Report Post  
Posted to microsoft.public.excel.misc
MnO
 
Posts: n/a
Default Use info in separate table file


Thank you very much.

It worked out just as I wanted.


--
MnO
------------------------------------------------------------------------
MnO's Profile: http://www.excelforum.com/member.php...o&userid=29672
View this thread: http://www.excelforum.com/showthread...hreadid=506780

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
How do I use info from an excel program and make file labels? Label maker Setting up and Configuration of Excel 1 November 30th 05 03:46 PM
Write cell info to external file BigIan Excel Worksheet Functions 7 November 14th 05 04:33 PM
pivot table cause file size to grow Grd Excel Discussion (Misc queries) 0 November 10th 05 06:10 PM
How to transfer info from PDF file to excel (lists)???????? [email protected] Excel Worksheet Functions 2 August 23rd 05 09:53 PM


All times are GMT +1. The time now is 09:42 PM.

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

About Us

"It's about Microsoft Excel"