Virginal
04-04-2012, 02:07 PM
I find myself out of my depth as I have never worked with more than one workbook before coupled with the fact that I am gathering data with variables.
Basically I have two workbooks Book1 which will display the output and contains the code and Book2 which which is a long list of sales data in a CSV file.
I have managed to open this and sort it by person and reverse date order. What I want to do is gather the data and produce an average of the last 30 sales of each individiual from Book2 and display it in Book 1.
I have no problem ascertaining the start position of each sales person and therefore calculating the cell references required, just averaging it using variables and displaying it in Book1.
All help and examples very welcome.
Basically I have two workbooks Book1 which will display the output and contains the code and Book2 which which is a long list of sales data in a CSV file.
I have managed to open this and sort it by person and reverse date order. What I want to do is gather the data and produce an average of the last 30 sales of each individiual from Book2 and display it in Book 1.
I have no problem ascertaining the start position of each sales person and therefore calculating the cell references required, just averaging it using variables and displaying it in Book1.
All help and examples very welcome.