Add to a cell if a row has a date and a column has a department

C

Craigm

From another worksheet I want to total miles driven by department.
pivot table won't work for me here. I need to code this. A sampl
worksheet is attached.

Column 1 is departments (not sorted, one row for each driver). Column
8 through 18 hold miles driven each month by each driver. Every drive
gets one row, starting in row 8.

Row 5 holds the date of the last day of the quarter, there are
quarters of data and the number of columns grows by one each month.
The first quarter end date is in Cells(5, 9). Currently the las
quarters date is in Cells(5, 18). So above each coulmn of monthly o
miles driven is the quarter end date in row 5 of the same column.

Rows 8 through 500 hold miles driven by each driver. Each row hold
the 9 quarters of miles driven by each driver. The first availabl
monthly miles driven data is cell(8,9). The last monthly miles drive
for each driver is (8, 18)

From another worksheet in the same workbook I want to total mile
driven by department.

I am in for..next, select..case hell and the gray cells have died!

Thanks for your help! Craig
 
T

Toppers

Craig,
Attachments not allowed so can you post to
(e-mail address removed).

Your post seems to suggest only 11 months of data Cols 8 to 18) but no doubt
your attachment will clarify all.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top