I'm stumped and will try to explain this as best as I can. I'm using one sheet as a database and the other for generating a report. When the user enters a begin date (20130801) and end date (20130808), the Report workbook will call upon the Database workbook. Column "A" of the Database workbook is used for labeling and is setup like this:
<code>Date
Dept1
060000
...... 'Every 15 min from 6am to 7pm (53 15min time intervals)
190000
Dept2
060000
...... 'Every 15 min from 6am to 7pm (53 15min time intervals)
190000
Dept3 ... 'For a total of 5 dept.
</code>I can use .Find to find the first column based on the user's requested begin date and then a Do While loop to cycle through each column until Date (Row 1, Column ?) = end date, but I need help finding a way to add the data under each column to an array and then preserve and add additional data to the array when cycling through the Do While loop. When done with the Do While loop, I'll take the total values and paste them in a report. Here is an example:
<code>Date.....20130801...20130802...And So On
Dept1...."Blank"...."Blank"...
060000...5..........1.........
061500...6..........2.........
063000...7..........3......... </code>...
Using Dept1(060000) as an example, I need the array to add each value for each day at this time until the end date is reached. I'll later need to extract that sum, divide by the number of days, and add the value to a cell on the report. Any help would be extremely appreciated.
<code>Date
Dept1
060000
...... 'Every 15 min from 6am to 7pm (53 15min time intervals)
190000
Dept2
060000
...... 'Every 15 min from 6am to 7pm (53 15min time intervals)
190000
Dept3 ... 'For a total of 5 dept.
</code>I can use .Find to find the first column based on the user's requested begin date and then a Do While loop to cycle through each column until Date (Row 1, Column ?) = end date, but I need help finding a way to add the data under each column to an array and then preserve and add additional data to the array when cycling through the Do While loop. When done with the Do While loop, I'll take the total values and paste them in a report. Here is an example:
<code>Date.....20130801...20130802...And So On
Dept1...."Blank"...."Blank"...
060000...5..........1.........
061500...6..........2.........
063000...7..........3......... </code>...
Using Dept1(060000) as an example, I need the array to add each value for each day at this time until the end date is reached. I'll later need to extract that sum, divide by the number of days, and add the value to a cell on the report. Any help would be extremely appreciated.
Last edited: