Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to Improve Code Copying/Pasting Between Workbooks | Excel Discussion (Misc queries) | |||
How do I use info from an excel program and make file labels? | Setting up and Configuration of Excel | |||
Write cell info to external file | Excel Worksheet Functions | |||
pivot table cause file size to grow | Excel Discussion (Misc queries) | |||
How to transfer info from PDF file to excel (lists)???????? | Excel Worksheet Functions |