Create list of unique items without empty rows

Using this formula, I can get an idea of which rows are distinct:
=IF(COUNTIFS($H$2:$H2,$H2)=1,"Distinct","")

Open in new window

Using this formula I can create this:
Unique ListThe problem here is that it contains blank lines. What I really need is a list of distinct values without any spaces in between like this:
Condensed Unique ListHow can I do that?
LVL 22
Russ SuterSenior Software DeveloperAsked:
Who is Participating?
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.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
If you are trying to concatenate First Name and Last Name from column A and B for unique first and last name combinations in column D, try this...

Assuming your data is in the range A1:B9, try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of Enter alone.

In D1
=IFERROR(INDEX($A$1:$A$9,SMALL(IF(FREQUENCY(MATCH($A$1:$A$9&$B$1:$B$9,$A$1:$A$9&$B$1:$B$9,0),ROW($A$1:$A$9))>0,ROW($A$1:$A$10)),ROWS(D$1:D1)))&" "&INDEX($B$1:$B$9,SMALL(IF(FREQUENCY(MATCH($A$1:$A$9&$B$1:$B$9,$A$1:$A$9&$B$1:$B$9,0),ROW($A$1:$A$9))>0,ROW($A$1:$A$10)),ROWS(D$1:D1))),"")

Open in new window

Confirm with Ctrl+Shift+Enter and copy it down until you get blank cells.

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
Ryan ChongSoftware Team LeadCommented:
if you're subscribed as Office Insider, you should able to use the new feature UNIQUE to get unique value list.

UNIQUE function
https://support.office.com/en-us/article/unique-function-c5ab87fd-30a3-4ce9-9d1a-40204fb85e1e
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
Microsoft Office

From novice to tech pro — start learning today.