Goal: I want to import a worksheet from workbook1 to workbook3, but before that I want to make an addition to the importing sheet from workbook1. The addition is equal to one colum with calculations done from a third workbook - workbook2.
Set-up: I would want an button in workbook3 that prompt for file 1 - workbook1 and file 2 - workbook2, then it appends the calculation data from workbook 2 to a colum in workbook 1 before importing that entire sheet two workbook3 with the filename of the workbook or the worksheets name in workbook1.
Why? It's a purchasing thing, I got a workbook - workbook1 with delivery accuracy percentage for a set of rows (suppliers). But I don't know just from workbook1 if this percentage is based on one PO-line (purchase orderline) or 100 (the latter which indicate more 'reliable' percentage). This data is found in workbook 2. Where each row is a PO-line and there is a colum indicating which supplier it is - SupplierID.
Is this even possible to peform calculation in some kind of 'temp'-mode? I was thinking to have an operation like two array lists with the same length, one would contain (create) the supplier ID and the other the corresponding nbr of PO-lines for that supplier. I would in my for-loop for the arrays in woorkbook2 just append +1 (PO-line) to array2 whenever the loop encountered a row with the same supplier again.
When the arrays would be done, I would just do a row-loop in workbook1 to writhe out the summarized nbr of PO-lines (one row for each supplier). When I would have this one sheet with all information. It would just be imported to workbook3 with the name of either workbook1 or the sheet in workbook1.
Is it possible and how? Or do you have any other suggestion based on what I want to achive given that the data is contained in two different workbooks, and that I need workbook3 where I compile this kind of data for each month (so there is already history in this file - workbook3). Of course I want minimal manual steps when trying to achive this.
Thanks!