Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with VB and Excel
I'm trying to take values from one spreadsheet and transfer them to
another "Summary" sheet via VB with no user intervention. I have a query which executes in VB, returns the recordset to Excel and subtotals based on department number and coverage levels. There are 4 different coverage levels (A,B,C,D) and approx. 32 depts. What I need to do is count the number of enrollees by dept. and coverage level and return these values to a summary page which is also broken down by dept. Below is an example of how the two sheets look: *Detail: Dept Cov 210 A 210 A 210 A 210 A 210 A 210 B 210 C 210 C 210 C 210 C 210 C 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D 210 D *Summary Page: # Department Enrolled 210 5 1 5 14 Does anybody know an easy way to accomplish this? I thought of creating a function and calling it when I'm formatting the Summary page. For instance, the function might be set up like fnCountEnrollees(myDept, myLevel) as Integer but I'm stuck on where to go from there. Any help would be greatly appreciated. Thanks, Joe W. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|