I'd like to generate a summary from columns of data. Normally I'd use a pivot table but I need to automate this using VBA. Basically there is a new entry for every time someone uses a tool and how long the tool is used for. What I need to do is summarize the total time that each person spent with each type of tool.
My data table is laid out as such:
Column A - Names (that can be repeated)
Column B - Tool (can be repeated)
Column C - Time
What I would like to see is VBA creating a new "summary" table using data from the input table similar to the functionality of a pivot table. I've found some code that will allow me to put a list of unique names from column A in a list so I need to expand that to include the tools that were used. After I generate that list, I can use an array formula (unless there's a better suggestion) to calculate the time used with each tool.
Here's the code I have so far. Any additional help would be greatly appreciated.
Sub UniqueList()
Dim rListPaste As Range
On Error Resume Next
Set rListPaste = Range("H1")
Range("A1", Range("A65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=rListPaste.Cells(1, 1), Unique:=True
End Sub
Thanks!
My data table is laid out as such:
Column A - Names (that can be repeated)
Column B - Tool (can be repeated)
Column C - Time
What I would like to see is VBA creating a new "summary" table using data from the input table similar to the functionality of a pivot table. I've found some code that will allow me to put a list of unique names from column A in a list so I need to expand that to include the tools that were used. After I generate that list, I can use an array formula (unless there's a better suggestion) to calculate the time used with each tool.
Here's the code I have so far. Any additional help would be greatly appreciated.
Sub UniqueList()
Dim rListPaste As Range
On Error Resume Next
Set rListPaste = Range("H1")
Range("A1", Range("A65536").End(xlUp)).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=rListPaste.Cells(1, 1), Unique:=True
End Sub
Thanks!