Hello all,
I am looking to see if someone will help me create a macro that would flatten a data table (or move the data from rows into columns) by Name and Activity in excel.
Basically I need to go from this (but there will be many different activities per name):
Name - Activity - Start Date - End Date - Hours
John Smith - Vacation - 12/22/2018 - 12/22/2018 -9
John Smith - Vacation - 12/28/2018 - 12/29/2018 - 18
John Smith - Holiday - 01/01/2019 - 01/01/2019 - 9
John Smith - Holiday - 01/21/2019 - 01/21/2019 -9
Matt Sorum - Vacation - 02/01/2019 - 02/02/2019 - 18
Matt Sorum - Vacation -02/05/2019 -02/08/2019 -36
To this:
Name -Activity- Start - End - Hours - Activity - Start - End - Hours
John Smith - Vacation -12/22/2018 -12/22/2018 -9 -Vacation -12/28/2018 - 12/29/2018 - 18
John Smith - Holiday -01/01/2019 - 01/01/2019 - 9- Holiday -1/21/2019 -01/01/2019- 9
Matt Sorum -Vacation - 02/01/2019 - 02/02/2019 -18 -Vacation -02/05/2019 -02/08/2019 36
The macro does not need to create a new worksheet for this. It can just create the new data in the same worksheet starting in column H or just modify the existing data table structure, whatever is easier.
Thanks in advance!
I am looking to see if someone will help me create a macro that would flatten a data table (or move the data from rows into columns) by Name and Activity in excel.
Basically I need to go from this (but there will be many different activities per name):
Name - Activity - Start Date - End Date - Hours
John Smith - Vacation - 12/22/2018 - 12/22/2018 -9
John Smith - Vacation - 12/28/2018 - 12/29/2018 - 18
John Smith - Holiday - 01/01/2019 - 01/01/2019 - 9
John Smith - Holiday - 01/21/2019 - 01/21/2019 -9
Matt Sorum - Vacation - 02/01/2019 - 02/02/2019 - 18
Matt Sorum - Vacation -02/05/2019 -02/08/2019 -36
To this:
Name -Activity- Start - End - Hours - Activity - Start - End - Hours
John Smith - Vacation -12/22/2018 -12/22/2018 -9 -Vacation -12/28/2018 - 12/29/2018 - 18
John Smith - Holiday -01/01/2019 - 01/01/2019 - 9- Holiday -1/21/2019 -01/01/2019- 9
Matt Sorum -Vacation - 02/01/2019 - 02/02/2019 -18 -Vacation -02/05/2019 -02/08/2019 36
The macro does not need to create a new worksheet for this. It can just create the new data in the same worksheet starting in column H or just modify the existing data table structure, whatever is easier.
Thanks in advance!
Last edited: