TheChugnut
New Member
- Joined
- Aug 3, 2014
- Messages
- 2
Hi all,
I'm relatively new to the VBA and the Excel Object Model and a long time lurker in need of some advice on the most efficient way to attack this problem. Any input would be greatly appreciated.
Following is a simplified scenario.
I've got two workbooks:
Upon a button press, first workbook opens the second workbook, filter Column G for all cells containing the 3 character customer code (wildcards would be needed), then filter Column J for the product code (I should point out that there will always be no matches or one single match). If a match is found, return the data corresponding data in Columns A, H and I.
I hope that made some sort of sense and you are able visualize it in your head. Should I be using Autofilter or create a pivot table table in a new sheet (not in VBA) then manipulate it using VBA? Bearing in mind that this would need to iterate through up to 25 product codes in the first workbook.
Many thanks in advance!!!
TheChugnut
I'm relatively new to the VBA and the Excel Object Model and a long time lurker in need of some advice on the most efficient way to attack this problem. Any input would be greatly appreciated.
Following is a simplified scenario.
I've got two workbooks:
- The first contains 25 product codes, and a global string variable containing a unique three character alpha numeric customer code.
- The second contains a dataset with ~300,000 rows and columns A-Q. This workbook is located on a server and is approximately 20MB, so this is why efficiency is key.
Upon a button press, first workbook opens the second workbook, filter Column G for all cells containing the 3 character customer code (wildcards would be needed), then filter Column J for the product code (I should point out that there will always be no matches or one single match). If a match is found, return the data corresponding data in Columns A, H and I.
I hope that made some sort of sense and you are able visualize it in your head. Should I be using Autofilter or create a pivot table table in a new sheet (not in VBA) then manipulate it using VBA? Bearing in mind that this would need to iterate through up to 25 product codes in the first workbook.
Many thanks in advance!!!
TheChugnut