Thread: Coding help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Coding help

What you are asking for sounds simple enough but actually is incredibly
complex. Unless you are very adept with VBA and coding then I do not
recommend this. Even if I gave you the code (which would take a whole lot of
work) you would not be able to fix it if it broke. As a suggestion to get
around this you might try modifying the data such that each line contains all
of the data associated with the employee hours. It would look like this:

MGR1 Monday Jim hours
MGR1 Monday Joe hours
MGR1 Monday Pat hours
MGR1 Tuesday Jim hours
MGR1 Tuesday Joe hours
Mgr2 Monday Tim hours
Mgr2 Tuesday Cal hours

A macro to accomplish this is relatively easy. Once the data is in this form
it would be very easy to run subtotals and or pivot tables on the data and
get exactly the types of reports you are looking for...

"fpd833" wrote:

This is what I am starting with:

Column A contains a list of manager names. Each manager has his name listed
once in colunm A.
Column B contains days of the week. Each day of week is listed once per mgr
in colunm B.
Column C contains empolyee names. Each employee is listed more than once
depending on the number of days scheduled.
Column D contains a number indicating hours scheduled.
It looks something like this:

MGR1 Monday Jim hours
Joe hours
Pat hours
Tuesday Jim hours
Joe hours
Mgr2 Monday Tim hours
Tuesday Cal hours
and so on......
I need it to look like this:

MGR1 Monday Jim hours Tuesday Jim Hours
Joe hours Joe Hours
Pat hours
Mgr2 Monday Tim hours Tuesday Cal Hours

and I have no idea how to accomplish this with a macro. Can anyone provide
some assistance? Thanks in advance!