View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jay
 
Posts: n/a
Default Importing data, then adding data to the new spreadsheet.. a conund

I have imported data from one Excel spreadsheet into a new spreadsheet
e.g. a list of names. Now I wish to add data (which isn't imported)
e.g. telephone numbers in the same rows as the imported data. This
data (telephone numbers) relates to the imported data (names).
However, if I were to delete a row in the original spreasheet listing
the names, and then refreshed the new spreadsheet, the names and
telephones wouldn't match up anymore. How do I ensure that the names &
telephone numbers do match up after the source of the imported data is
changed? (this is only an example.. I'm not really matching names and
telephone numbers in this way;)


One way is to use VLOOKUP.

First put pairs of names and telephones in a list on a second sheet.

Then, in the "added data" column, use the VLOOKUP function, referring to
the second sheet. To deal with the situation where a value is missing from
the second sheet, wrap the VLOOKUP inside an "IF" function. An example is
at
http://www.contextures.com/xlFunctions02.html