This won't be fast.
As you read in each line, add it to a string.
But before adding each line, do a test to see if already in the string.
VB Code:
  1. If InStr(1,sBuilding,sCandidate)=0 then
  2.   Add to your count
  3.   Concatenate sCandidate onto end of sBuilding
  4. End If