Trying to Transpose and Group Items in Excel

I have a list as follows...

A                          B
Form A                Category 1
Form D               Category 2
Form A               Category 3
Form B               Category 1
Form B               Category 2
Form C              Category 3

I would like the Output to be....

Form A : Category 1; Category 3
Form B:  Category 1; Category 2
Form C:  Category 3
Form D:  Category 2

This could be in another table, or on the same line. I am moving it into another program. I tried this code, but it doesn't work for me, I ended up with all 0.

I tried this one, but it gave an error about a loop, or a number being wrong...

In the first article, I am unsure what the author means by uniquelist. Is this a feature in excel, or is he just naming the cell/column? I have 5876 rows of data, so in the first example I changed the 19s to 5876.

In the second example I made a similar adjustment.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Saqib Husain, SyedEngineerCommented:
If you can live with this format
Form A	Category 1
	Category 3
Form B	Category 1
	Category 2
Form C	Category 3
Form D	Category 2

Open in new window

Then a pivot table is a good solution

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mSproutAuthor Commented:
I found a much better answer once I changed my wording of the question.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.