Matching up arrrays


Posted by Phil Burkett on August 15, 2001 12:29 PM

I have two tables A&B. I want to copy specific info from table B into table A. Each table has a list of names in column 2. How do I match the names in table B to the same name in table A so I can copy the data into the correct row in table A? Hope that made sense.

thanks
Phil

Posted by Aladin Akyurek on August 15, 2001 1:00 PM

Have a look at INDEX and MATCH functions. Also, you can look at relevant tips at

http://www.mrexcel.com/tip021.shtml

concerning these functions.

Aladin

Posted by Phillip Burkett on August 17, 2001 6:34 AM

Re: Here's the correct answer

Just incase some poor soul out there is in desparate need for this answer.

First let me restate the question more clearly.

I would like to merge player stats/proj/info from different sources and I can't for the life of me figure out how to line up the columns from the different sources:
Example: Lets say that table A includes player name/team/and projected tds, and table B has player name and bye week and I want to add the bye week info in table B to table A. But there are more players listed in table B so sorting by name will not allow me to line up the rows correctly.
I've played with "match" and "index" and a few others with no luck.

Now the answer:
Hey Phil. If the player names are the same format (i.e. Matt Hasselbeck in both, not Matt Hasselbeck and Hasslebeck,Matt), then do this:

1. Sort both tables by name.
2. Add a blank column to Table A for the bye week.
3. Use the formula VLOOKUP(Player Name in Table A, Table B, Number of Column the Bye Week Is In, FALSE)

Note: You want to make sure to use the FALSE parameter to make sure it finds an exact match to the player name.

4. Copy the formula down for all players in Table A. Make sure to put $ $ around the Table B reference in the VLOOKUP formula.
5. After it is all referenced and seems to work. Copy the new column and Paste Special > Values over the same area so it is just data and no longer formulas.

For an example of VLOOKUP (I use it a lot), see the way player bye weeks show up in the Compiler. All you have to do is change the team abbreviation on each position sheet and it automatically updates.




Posted by Aladin Akyurek on August 17, 2001 3:18 PM

Congrats! (NT)