![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 45
|
If I have a value in one file (A1) that needs to match to a value in another file which is in two columns (A1:B1), how do I get a return in column C. Example:
File 1 A Cat Dog Pig Horse File 2 A B Cat Meow Frog Croak Dog Woof Chick Peep Horse Neigh Duck Quack Pig Oink File 1 should now be: A B Cat Meow Dog Woof Horse Neigh Pig Oink [ This Message was edited by: Alexander on 2002-04-16 10:15 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
What problem are you having with Vlookup? What result do you get? Could you show your formula? If the information is not sorted and you want an exact match, add the 4th parameter - False. See Help for Syntax. |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 45
|
Is there a way I can send you a copy of the files so that you may look at it and tell me how to write the formula? My email is bettillee@msn.com.
|
|
|
|
|
|
#4 | |
|
Board Regular
Join Date: Feb 2002
Posts: 7,743
|
Quote:
In B1 of file 1 enter =VLOOKUP(A1,file2!$A$1:$B$7,2,1) |
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,512
|
Hi there. Brian's explanation looks like it will work for you. If not, or if you're having difficulty understanding the vlookup formula, you can check this out:
http://www.thewordexpert.com/excel.h...DreadedVlookup Hope it helps!
__________________
~Anne Troy |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
or try Brian's formula revised slightly In B1 of file 1 enter =VLOOKUP(A1,file2!$A$1:$B$7,2,0) |
|
|
|
|
|
#7 |
|
New Member
Join Date: Apr 2002
Posts: 45
|
This works fine, except file 1 has 2000 lines and file 2 will vary, from 100 to 1000. It is not matching correctly.
|
|
|
|
|
|
#8 |
|
New Member
Join Date: Apr 2002
Posts: 45
|
Never mind. I was wrong. It works great and thank you all!
|
|
|
|
|
|
#9 | |
|
Board Regular
Join Date: Feb 2002
Posts: 7,743
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|