Copying Row Labels when using Subtotal


Posted by PAH on October 24, 2001 6:26 AM

I saw a solution to this on the boards a while back, but can't find it now. Whenever I subtotal a spreadsheet I end up having to manually copy the label from the row above to my subtotal line manually. Is there an easier way? For example if my spreadsheet has column Employee Name and I am subtotaling the hours worked by each Employee, I have to manually copy and past each employee name from the row above to the subtotal line. This becomes really annoying in a large spreadsheet with hundreds of employees.

Posted by Mark W. on October 24, 2001 6:40 AM

I'm puzzled... I created the following data set...

{"Employee Name","Hours Worked"
;"Larry",10
;"Larry",4
;"Mary",12
;"Mary",6
;"Mary",19}

When I use the Data | Subtotals... menu command to
add a subtotal for each change of Employee Name
I get labels such as "Larry Total", "Mary Total"
and "Grand Total". Why don't you?



Posted by Juan Pablo on October 24, 2001 9:18 AM

Although i agree with Mark, got the same results, you could try this...

With this data you should get subtotales in rows 4 and 8, and a gran total in 9. Now, select Level 2 to show only Subtotals and grand total, and select range A4:A8. Now goto Special, Visible Cells, and put this formula (If your active cell is A4)

=A3&" Total"

That way you should get the employee name total...

Juan Pablo