Good morning all,
I have excel reports generated by accounts which detail the hours that people have booked to a job. What I currently have is a macro that uses sumproduct to create a table of people down the left hand side and hours and costs along the top. This is generated in another sheet.
However, one month, this may be 15 people, the next it may be three, or for a whole job it could be in the hundreds. Currently this is set up for 25 people, although when it is run against three people, the table is largely blank, and when it is run for 100 people it isn't large enough.

I would like the macro to be able to automatically detect the number of people (column R), and hence fit the table in the other sheet accordingly.
Hope this makes sense,
Many thanks,
Hywel