Hi All

I have a sheet that stores all the departments as below:

Departments Total Batches Total Documents
101
102
103
104
:
:
:

Now I want VBA code that will look for all the departments in the Access table and calculate the total batches and total documents using Total(Batches) , Total(Documents) and then store the values in the above sheet.

The fields in the Access table are : Dept,Batches,Documents

The data gets stored as below in Access table:
Dept Batches Documents
100 1 2
100 0 1
101
101
100
108
103
108
104
100
101

etc....

Now how can I write vba code to perform this?

Thanks.