So I have been toying with a way to do this in excel, and my brain is not big enough to figure it out apparently.

I have a massive spreadsheet with web URLs in column A and other columns. Want to remove all but the first occurrence of a root URL from the sheet.

Col A example:

http://www.anydomain.com/userid=12
http://www.anydomain.com/services
http://anydomain.com/services/righton.asp
http://anydomain.com/jartnaff.php

So end result would be to generate a duplicate free spreadsheet that contains unique value rows between the // and the first / which in the above example would be:

http://www.anydomain.com/userid=12
http://anydomain.com/services/righton.asp

any help would be appreciated, I tried several things.

THanks.