View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernard Liengme[_3_] Bernard Liengme[_3_] is offline
external usenet poster
 
Posts: 1,104
Default delicate Excel-database problem

Let's say the first set of data is in A1:B100 and the second in F1:G80
In C1 enter =VLOOKUP(A1,F1:G80,2,FALSE) to pick up the username
But you say that some people my not have a username?
So change formula to
=IF(ISNA(VLOOKUP(A1,F1:G80,2,FALSE)),"",VLOOKUP(A1 ,F1:G80,2,FALSE))
so that you do not get error values for missing people


If you now a list with just card numbers and usernames:
Select B1:D100; copy
Move to new worksheet, use Edit | Paste Special with Values specified
Sort this data so as to remove the blanks

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"khers" wrote in message
...
I have two files containg employee data. File "name" contains two
colons: Name and Cardnumber like this:

Andersen John, 98372839
Angell Berit, 53827384
Bang Jens, 98128493

and my second file contains two colons: Name and username

Angell Berit, angber
Henriksen Christopher, henchr

As you see some of the names appear in both files, some don't. I need
to have a file with Cardnumber (from first file) and username (from
the second file).
Can this be done? Please help

thanks in advance
khers