Return unique values but with blank cells between values (Google Sheets)

FKalinx

New Member
Joined
Jul 2, 2014
Messages
39
Hi there

I am using Google Sheets and want to return a set of unique values but with blank cells between the returned values.

For instance:

Column A
- list of values

Apple
Banana
Apple
Pear
Grape
Apple
Pear



Column B
- list of unique values with blank rows between

Apple



Banana



Pear




Grape

---


I've tried UNIQUE with SPLIT but it doesn't work.

Any help would be much appreciated.

Thanks
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Hi there

Found this in a google search.. maybe try it...

Excel Formula:
=FLATTEN(SORT({UNIQUE({A1:A10,IF(A1:A10="","","")})}))

Screenshot 2022-09-21 112225.png
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Return unique values but with blank cells between values
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Return unique values but with blank cells between values
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
Thanks, noted and apologies - I didn't realise that Mr Excel and Excelforum were related.
 
Upvote 0
We are not related, but most sites have a similar rule about cross-posting.
 
Upvote 0
You're a star, thanks Jimmypop. It works :) How would I add 5 blanks between the values? I've tried adding more '"","",""

and if you try...

Excel Formula:
=TRANSPOSE(Split(join(" , , ,",FLATTEN(SORT({UNIQUE({A1:A10,IF(A1:A10="","","")})}))),","))
 
Upvote 0
Pleasure and thanks for the feedback... the formula I gave can be shortened but at the moment it was what I could come up with...

UPDATE... A bit shorter...

Excel Formula:
=TRANSPOSE(Split(join(" , , , , , ,",FLATTEN({UNIQUE({A1:A10})})),","))
 
Last edited:
Upvote 0
Pleasure and thanks for the feedback... the formula I gave can be shortened but at the moment it was what I could come up with...

UPDATE... A bit shorter...

Excel Formula:
=TRANSPOSE(Split(join(" , , , , , ,",FLATTEN({UNIQUE({A1:A10})})),","))

Brilliant, thank you :)

If I wanted to add more blank cells, is there an easy way to adjust the formula, say for 10 blanks?
 
Upvote 0

Forum statistics

Threads
1,223,323
Messages
6,171,468
Members
452,406
Latest member
kken tthompson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top