Hey. I urgently need some help on building up a complete table using VBA. I have got data from two seperate sources of data and i need to put them into same table based on one of the category "Car". I've uploaded an example here .http://www.speedyshare.com/files/23058842/abc.xls
A:
Quick and dirty to do this one time you can do this with the VLOOKUP worksheet function. Enter =VLOOKUP(B2,$F$2:$I$6,2,FALSE) into D2 and =VLOOKUP(B2,$F$2:$I$6,3,FALSE) into E2 in your example and then copy/paste the two cells down to see what I mean.
Writing the equivalent VBA will take a few more minutes. If the solution is reusable let me know and I'll spend the requisite few minutes, but be advised the VBA will vary slightly depending on the real sources of each of the tables of data (in their own worksheets? in their own workbooks?)
Tahbaza
2010-06-21 03:43:01
Thanks. I tried the code you enter and it worked perfectly. However, as to get the code, i record the steps using MACRO and paste them into the VBA platform. (to use a single button to build the table) However, everytime the data on the top left corner could not be shown and the formula for that box is wrong. Yet,The rest of the data are correct...... how could i fix it??THANKS AGAIN!
HACHI
2010-06-21 08:04:07