sync two workbooks with respect to cell content matching
Posted by Tan Le on September 11, 2001 2:40 PM
Hi Richard,
I am so glad that I you are helping me. Your answer is better than VBA. But I need more help. I can't get it to work. How do name the range "header"? Is is just typing the titles in row 1 for every column? I re-iterate the problem below and incorporate your formula. Please see if that is correct!
I have two Excel workbooks. Book1 has two columns: Symbol (col. A) and Industry (col.B). The Book2 has also two columns: Symbol (col. A) and Description (col. B). As you can see both workbooks have the same Symbol because the contents of Symbols are identical.
----------------------------
Book1.xls:
1 Symbol Industry
2 CORN FOOD
3 OAT WHEAT
4 CARROT VEGE
.
.
.
.
---------------------
Book2.xls:
1 Symbol Description
2 CORN IT'S A YELLOW SEED
3 CARROT IT'S A RED VEGE
4 OAT IT'S A BROWN GRAIN
.
.
.
-------------------------
The goal is to make book1.xls to look like this:
1 Symbol Industry Description
2 CORN FOOD IT'S YELLOW SEED
3 OAT WHEAT IT'S BROWN GRAIN
4 CARROT VEGE IT'S RED VEGE
You suggest to put the equation in book1.xls cell C2 equal to:
=IF(ISERROR(MATCH(A2,Book1.xls!Symbol,0)=TRUE),0,HLOOKUP($B$2,Book2!Description,(MATCH(A2,Book1!Symbol,0))))
I tried..it returns 0, any idea?
Best regards,