Magoosball
Board Regular
- Joined
- Jun 4, 2017
- Messages
- 70
- Office Version
- 365
I'm trying to write a VBA script that will turn table A into Table B
Table A:
<tbody>
</tbody>
Table B
<tbody>
</tbody>
In summary: For each persons name in row A, I want to combine the cells, separated by a comma, if the cell contains the words: "Dog", "Cat", or "Rat"
Thank you in advance!!
Table A:
Name | Animal |
Mike | Dog |
Mike | Cat |
Mike | Mouse |
Mike | Rat |
Mike | Chicken |
Mike | Snake |
Mike | Bear |
April | Mouse |
April | Chicken |
April | Snake |
James | Bengal Cat |
James | Rat |
Thor | Dog |
Thor | Cat |
Thor | Rat |
Thor | Snake |
Thor | Bear |
<tbody>
</tbody>
Table B
Name | Animal |
Mike | Dog, Cat, Rat |
Mike | |
Mike | Mouse |
Mike | |
Mike | Chicken |
Mike | Snake |
Mike | Bear |
April | Mouse |
April | Chicken |
April | Snake |
James | Bengal Cat, Rat |
James | |
Thor | Cat, Rat |
Thor | |
Thor | Snake |
Thor | Bear |
<tbody>
</tbody>
In summary: For each persons name in row A, I want to combine the cells, separated by a comma, if the cell contains the words: "Dog", "Cat", or "Rat"
Thank you in advance!!