View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rob Hick Rob Hick is offline
external usenet poster
 
Posts: 16
Default Can this be done?

from what you've said, i think your problem is that you have an
un-useful identifier of your courses ('CourseNumber') in the
spreadsheet. you would like to replace this CourseNumber with the more
useful identifier 'CourseID'.

if all your tables are in Access, i would suggest that you do the
comparison in Access itself rather than copying the data into Excel.
You should be able to import your new spreadsheet and then create a
query which includes all the data from the spreadsheet and the CourseID
field.

However, if you are happier doing it in Excel then you should use the
VLOOKUP function (search Excel Help for more). Using what you've
described above as an example:

copy the CourseNumber and CourseID fields from the table into your
original spreadsheet (you should be able to just copy and paste rather
than export etc.). Assume here that this data is on sheet 'Course' and
is in range A1:B10. Make sure the CourseNumber field is on the left
because this is the column you want to 'lookup'. the CourseID field
should be in the column next to it.

then if the CourseNumber in your original dataset is in colA, insert a
new column (colB) and in that column put the following formula:

=VLOOKUP(A1,'Course'!A1:B10,2,FALSE).

Rob