Hi Paul
As per your description, it seems your desirable output will look like the one in the picture below
If so, we might have 4 ways to achieve your goals
Pivot Tables, Power Query, VBA macro, and Array Formulas.
From the picture you posted, it seems the Excel version you are using is from 2010 or 2013
If so.
- Pivot Table solution
It **** will be a quick and dynamic solution.
a) Add a helper column to your original table to calculate the running count per ID with the formula =COUNTIF($B$2:B2,B2). and copy it down
Adapt ranges in the formula to your real scenario
b) Convert your table into an Excel Table and create a Pivot Table
Select any cell within the table >> go to Insert ribbon Tab >>Insert Pivot Table >> From Table/Range
c) Make sure the entire table is selected/highlighted. Set the Pivot table to another sheet.
d) To build the Pivot Table select and drag the highlighted fields to the areas as indicated in the picture below
and VOILA!!!
2) Power Query solution
As the Pivot table is a very dynamic way to manipulate your data.
In your case Power Query might be an Add-In you have to enable.
Please refer to this video for details on how to do it. https://www.youtube.com/watch?v=gwW2CDdvUUs
Do let me know if you are interested in a Power Query solution
3) Formula Solution
Using the same helper column (Count_ID) with a little twist in the formula
=B2&"Result-"&COUNTIF($B$2:B2,B2)
For the Output Table
Considering you have already the list of Unique ID
=IFERROR(INDEX(Sheet1!$G:$G,MATCH($A2&B$1,Sheet1!$I:$I,0)),"")
4) VBA macro solution
I haven't worked on that yet, but surely other colleagues in the forum might help you if you specifically want a VBA solution t your problem.
I hope this helps you and gives a solution to your problem,
Do let me know if you need more help.
Regards Jeovany