I'm hoping someone can assist me in writing a script which would automatically add a line in a sheet ('Sheet1') when a duplicate is identified in another sheet ('Sheet2').
To further explain, basically I have a two sheets which contains completely separate information with the exception of one column which identifies a category/group. 'Sheet1' identifies all possible categories/groups as well as a number associated with a given group on a monthly basis. 'Sheet2' identifies a person, the role or service they provide, and the group they are a part of. Previously I wrote a function to combined the names of all the people associated with a group (found in 'Sheet 2') into the individual group cell in 'Sheet1', however upon review with other stakeholders it was concluded that when a duplicate group is found on 'Sheet2' an additional group line item should be added to 'Sheet1'.
I've Provide shap-shots below to help clarify(FYI - please assume the first 'cell' is A1):
1) Below is a condensed example of the Information found in 'Sheet2'
[TABLE="class: grid, width: 528"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Role[/TD]
[TD]Group Description & Number[/TD]
[TD]Group Name[/TD]
[TD]Group #[/TD]
[/TR]
[TR]
[TD]John Smith[/TD]
[TD]PM[/TD]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Jane Smith[/TD]
[TD]PE[/TD]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]John Doe[/TD]
[TD]Consultant[/TD]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Jane Doe[/TD]
[TD]Consultant[/TD]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
2) Below is my current view in 'Sheet1' using the combined function.
[TABLE="class: grid, width: 875"]
<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]# - Group description[/TD]
[TD]Group Description[/TD]
[TD]Team Member[/TD]
[TD]Role[/TD]
[TD]Group[/TD]
[TD]Jan - 15[/TD]
[TD]Feb - 15[/TD]
[TD]Mar - 15[/TD]
[/TR]
[TR]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]John Smith, Jane Smith[/TD]
[TD]PM, PE[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]John Doe, Jane Doe[/TD]
[TD]Consultant, Consultant[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
3) Below is an example of desired outcome once script is complete.
[TABLE="class: grid, width: 875"]
<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]# - Group description[/TD]
[TD]Group Description[/TD]
[TD]Team Member[/TD]
[TD]Role[/TD]
[TD]Group[/TD]
[TD]Jan - 15[/TD]
[TD]Feb - 15[/TD]
[TD]Mar - 15[/TD]
[/TR]
[TR]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]John Smith[/TD]
[TD]PM[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]Jane Smith[/TD]
[TD]PE[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]John Doe[/TD]
[TD]Consultant[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]Jane Doe[/TD]
[TD]Consultant[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
If anyone can assist with this script it would be greatly appreciated.
To further explain, basically I have a two sheets which contains completely separate information with the exception of one column which identifies a category/group. 'Sheet1' identifies all possible categories/groups as well as a number associated with a given group on a monthly basis. 'Sheet2' identifies a person, the role or service they provide, and the group they are a part of. Previously I wrote a function to combined the names of all the people associated with a group (found in 'Sheet 2') into the individual group cell in 'Sheet1', however upon review with other stakeholders it was concluded that when a duplicate group is found on 'Sheet2' an additional group line item should be added to 'Sheet1'.
I've Provide shap-shots below to help clarify(FYI - please assume the first 'cell' is A1):
1) Below is a condensed example of the Information found in 'Sheet2'
[TABLE="class: grid, width: 528"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Name[/TD]
[TD]Role[/TD]
[TD]Group Description & Number[/TD]
[TD]Group Name[/TD]
[TD]Group #[/TD]
[/TR]
[TR]
[TD]John Smith[/TD]
[TD]PM[/TD]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Jane Smith[/TD]
[TD]PE[/TD]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]John Doe[/TD]
[TD]Consultant[/TD]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Jane Doe[/TD]
[TD]Consultant[/TD]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
2) Below is my current view in 'Sheet1' using the combined function.
[TABLE="class: grid, width: 875"]
<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]# - Group description[/TD]
[TD]Group Description[/TD]
[TD]Team Member[/TD]
[TD]Role[/TD]
[TD]Group[/TD]
[TD]Jan - 15[/TD]
[TD]Feb - 15[/TD]
[TD]Mar - 15[/TD]
[/TR]
[TR]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]John Smith, Jane Smith[/TD]
[TD]PM, PE[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]John Doe, Jane Doe[/TD]
[TD]Consultant, Consultant[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
3) Below is an example of desired outcome once script is complete.
[TABLE="class: grid, width: 875"]
<colgroup><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]# - Group description[/TD]
[TD]Group Description[/TD]
[TD]Team Member[/TD]
[TD]Role[/TD]
[TD]Group[/TD]
[TD]Jan - 15[/TD]
[TD]Feb - 15[/TD]
[TD]Mar - 15[/TD]
[/TR]
[TR]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]John Smith[/TD]
[TD]PM[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]1 - Corporate[/TD]
[TD]Corporate[/TD]
[TD]Jane Smith[/TD]
[TD]PE[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]John Doe[/TD]
[TD]Consultant[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]2 - External Resources[/TD]
[TD]External Resources[/TD]
[TD]Jane Doe[/TD]
[TD]Consultant[/TD]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
If anyone can assist with this script it would be greatly appreciated.