I have the below table in Excel (TABLE).
I am trying to cycle through the table and story in an array (CODE).
Then cycle through the array and produce a unique output based on ID (OUTPUT).
I have provided the code I have but am having trouble determine the best way to loop through the array where the ID is the same - ie I want to group array outputs by ID.
TABLE
| ID | Name | Value |
---------------------
| 01 | John | Value |
| 01 | Sam | Value |
| 02 | Luke | Value |
| 03 | Jack | Value |
| 04 | Rob | Value |
| 04 | Bob | Value |
OUTPUT
01 - John, Sam
02 - Luke
03 - Jack
04 - Rob, Bob
CODE
'Store Array
For row = 2 to 6
MyArray(i,0) = Cells(row,1).value
MyArray(i,1) = Cells(row,2).value
MyArray(i,2) = Cells(row,3).calue
next row
'Output Array
For a = Lbound(MyArray) to Ubound(MyArray)
???
Next a
I do not know whether I use if/then/else statements or another loop to achieve this?

