How to Get a UNIQUE List from Many Columns Using FLATTEN in Google Sheets

Join 400,000+ professionals in our courses here 👉 link.xelplus.com/yt-d-all-courses
Getting a Unique List from values in multiple columns can actually be quite hard. An easy solution is a hidden function in Google Sheets: The FLATTEN Function. It takes the values in a specified range and puts them in a single column. In this video you'll learn how to use it in combination with the UNIQUE function to get a distinct list from a range. This would be a great function to have in Microsoft Excel!
★★★ Join My Google Sheets Comprehensive Masterclass: ► www.xelplus.com/course/google-sheets/
00:00 How to Get Distinct Values from a Range of Values
00:27 How to Use the UNIQUE Function
02:17 How to Use the FLATTEN Function in Sheets
04:52 Wrap Up
LINKS to related videos:
► 10 Google Sheets Tips You DON'T Want to Miss: kzread.info/dash/bejne/gWSfm9d-ZNvUdJM.html
► QUERY Function in Sheets: kzread.info/dash/bejne/oXd_2KOciLeyitI.html
Check out the complete blog post: www.xelplus.com/sheets-unique-list-from-multiple-columns/
★★★ My Online Excel Courses ► www.xelplus.com/courses/
➡️ Join this channel to get access to perks: kzread.info/dron/JtUOos_MwJa_Ewii-R3cJA.htmljoin
👕☕ Get the Official XelPlus MERCH: xelplus.creator-spring.com/
🎓 Not sure which of my Excel courses fits best for you? Take the quiz: www.xelplus.com/course-quiz/
🎥 RESOURCES I recommend: www.xelplus.com/resources/
🚩Let’s connect on social:
Instagram: lgharani
LinkedIn: www.linkedin.com/company/xelplus
Note: This description contains affiliate links, which means at no additional cost to you, we will receive a small commission if you make a purchase using the links. This helps support the channel and allows us to continue to make videos like this. Thank you for your support!
#googlesheets

Пікірлер: 246

  • @LeilaGharani
    @LeilaGharani5 ай бұрын

    Get access to the complete Google Sheets Masterclass here 👉 www.xelplus.com/course/google-sheets/

  • @dragonshadow1902
    @dragonshadow19023 жыл бұрын

    Always enjoy these videos showing some of the uncommon functions in excel and how they can be used. I know there have been a few times were I could have used this and did it the long way of copying each column of data into 1 column then using the remove duplicate button.

  • @vidhyashankarkannan4329
    @vidhyashankarkannan43292 жыл бұрын

    Thank you Ms. Leila for this video tutorial. It is the small things that add up in the end to make a workable solution. And you help me every day.

  • @HowToAnalyst
    @HowToAnalyst3 жыл бұрын

    Great tip, echoing everyone else, hoping Excel adds this functionality

  • @gumboe2007
    @gumboe20073 жыл бұрын

    Almost always learn something new with your videos. Well presented and pitched, thank you

  • @fyrman9092
    @fyrman9092 Жыл бұрын

    Your knowledge is amazing. This video solved a vexing problem I had that no one came close to providing the right formulas.

  • @NachoTeso
    @NachoTeso Жыл бұрын

    Yes! Thank you, I needed something like this. I was using Unique 2 times for something similar (first to just wrap all the names in one different sheet, then choosing each individual column to return the names in a single column in that same sheet). This will be faster and better.

  • @mrongad
    @mrongad3 жыл бұрын

    Thank you for sharing. This simple tutorial will help me with my projects.

  • @operlandsen
    @operlandsen2 жыл бұрын

    This formula will return a similar result in Excel (with or without the SORT function) and should be reasonably short and simple: =SORT(UNIQUE(FILTERXML(""&SUBSTITUTE(TEXTJOIN("|",TRUE,InputRange),"|","")&"","//b"))) Replace InputRange with the cell range you want to use as input. Could also be wrapped in a LAMBDA function for a more user friendly version.

  • @LeilaGharani

    @LeilaGharani

    2 жыл бұрын

    Thanks for sharing, Ole!

  • @leonardoalvespereira9494

    @leonardoalvespereira9494

    2 жыл бұрын

    I love you Ole !!! It works on my workbook!

  • @IbrahimNgouhouo

    @IbrahimNgouhouo

    2 жыл бұрын

    Thanks Ole I don't understand some functions here. I guess i'll just save it somewhere and copy and paste each time I need to use it 😃

  • @MrHonda52

    @MrHonda52

    2 жыл бұрын

    Thats amazing!

  • @tobydavy2052

    @tobydavy2052

    2 жыл бұрын

    works a charm, even where you have multiple ranges on different sheets! Thanks :)

  • @gioyfa
    @gioyfa3 жыл бұрын

    Wow 👏 Each time, you just simplify our life! Thank you!

  • @stratman21
    @stratman21 Жыл бұрын

    Once again - Thank you Leila. I have tried for 2 days to figure how to achieve in excel what =UNIQUE(FLATTEN(XX:XXXX)) does in sheets. I have your Udemy PQ course and a couple of your others, searched high, low and in between. Watched hours of you tube vids, and the feeling when all of that gets solved in 2mins40 of your mellifluous voice simply cannot be described. Thanks just is not enough.👍👍😍😍

  • @LeilaGharani

    @LeilaGharani

    Жыл бұрын

    It's my pleasure! I'm happy it was helpful.

  • @10129933286568
    @101299332865683 жыл бұрын

    Extremely fruitful (info) as always. Thanks.

  • @cenevspeed
    @cenevspeed3 жыл бұрын

    Thank You So Much Mam!! I understood everything so clearly 🔥🔥 please continue making such astonishing tutorials!! Thanks

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Thank you, I will.

  • @blacktalks256

    @blacktalks256

    2 жыл бұрын

    ​@@LeilaGharani Have we got a flatten equivalent in excel yet!

  • @asish_apr12
    @asish_apr123 жыл бұрын

    Leila, you are the magician of EXCEL. Every time you post a video I am finding some surprising tricks. Thank you so much.

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Happy to hear that!

  • @zafariqbalkhan6279
    @zafariqbalkhan62792 жыл бұрын

    Thanks a lot, I spent 2 hours in doing what you have done in less than a minute, :)

  • @OwenGeeAndre
    @OwenGeeAndre11 ай бұрын

    If I could use a Voice note, you'd have heard me crying tears of joy... As an entry level Data Analyst, this had been an issue for me for hours and I couldn't find a good solution... Thanks and I'm subscribed 😊

  • @patriciadejesus6667
    @patriciadejesus66672 жыл бұрын

    Amazing!!! Thank you for this. You're the best!

  • @KatlegoMasego
    @KatlegoMasego3 жыл бұрын

    Another informative video. Thank you.

  • @samjain6143
    @samjain6143 Жыл бұрын

    Hi Leila, I have been stuck with this issue for 3 hours but your video has helped me to solve it quickly. Thanks!

  • @LeilaGharani

    @LeilaGharani

    Жыл бұрын

    Glad it helped!

  • @KNLP23
    @KNLP23 Жыл бұрын

    Just what I was looking for, thank you.

  • @edwinnyaanga3861
    @edwinnyaanga38613 жыл бұрын

    You are just amazing. I continue to learn a lot!

  • @skmaheswaran
    @skmaheswaran3 жыл бұрын

    Leila : You are explaining things very clearly

  • @muzammiltariq3743
    @muzammiltariq37433 жыл бұрын

    Ma'am. Thank you so much... Your videos really helpful for me.

  • @jervahnmorgan
    @jervahnmorgan2 жыл бұрын

    She’s a phenomenal instructor!

  • @sunpy7908
    @sunpy79083 жыл бұрын

    Good point, I never considered using Flatten with unique. Great tip

  • @malikastar9265
    @malikastar9265 Жыл бұрын

    Thank you Leila, that was really helpful!

  • @abeel95
    @abeel952 жыл бұрын

    AWESOME! I was having a really hard time transforming an array into a single column and filtering

  • @ConnectLoveStrong
    @ConnectLoveStrong7 күн бұрын

    Thank you!

  • @suprava11
    @suprava11 Жыл бұрын

    Amazing tip n well explained. thank you very much. 🙂

  • @yesichristy5291
    @yesichristy52912 жыл бұрын

    Thank you. This video is a life saver!

  • @sm0kybare
    @sm0kybare8 ай бұрын

    She is one of the best Excel teachers on the Internet.

  • @thomaskoo7980
    @thomaskoo79807 ай бұрын

    You are a gem! Thanks for this clear-to-understand tutorial.

  • @LeilaGharani

    @LeilaGharani

    7 ай бұрын

    Glad it was helpful!

  • @frostysnook
    @frostysnook9 ай бұрын

    thank you for this video. figured out a function ive been trying to get done on a sheet for the last 3 days

  • @NicolaiKorsmoe
    @NicolaiKorsmoe3 жыл бұрын

    Awesome... As always 👍🏻

  • @jasonipfatsiong2062
    @jasonipfatsiong20623 жыл бұрын

    Useful function many thanks Leila

  • @MohAboAbdo
    @MohAboAbdo3 жыл бұрын

    Thank you very much, my dear teacher.

  • @prashantbarot30
    @prashantbarot303 жыл бұрын

    Great Ma'am 👍, Very informative

  • @abdullah9734
    @abdullah97342 жыл бұрын

    Thank You Very Much !

  • @runwiththerunners8152
    @runwiththerunners81523 жыл бұрын

    Another great tutorial -

  • @masternecrushne
    @masternecrushne3 жыл бұрын

    really nice...thanks!

  • @BalaHumo
    @BalaHumo2 жыл бұрын

    gracias por tu sabiduría

  • @rameshm1145
    @rameshm1145 Жыл бұрын

    awesome way of teaching

  • @nitesh.2019
    @nitesh.20193 жыл бұрын

    Can you please suggest the easiest way to do this in O365 if possible.

  • @lpanebr
    @lpanebr3 жыл бұрын

    Interesting. I had never noticed or used the other parameters for the unique function!

  • @RMLearningHub
    @RMLearningHub3 жыл бұрын

    Wowowo awesome trick 👍👍👍👌👌😊

  • @Simba.Luna.
    @Simba.Luna. Жыл бұрын

    YEAH!!!!! Thank You!

  • @haikasatryan
    @haikasatryan2 жыл бұрын

    You are a gift. Thanks, Mam 😘

  • @mohammadashiq9996
    @mohammadashiq99963 жыл бұрын

    I like simplicity and it's a great help.

  • @prakashneupane5636
    @prakashneupane56362 жыл бұрын

    Thank you So much Big Problem simple solutions

  • @tirmistirmis
    @tirmistirmis2 жыл бұрын

    Thanks for the tutorail. It's been really helpful. Any way to use this in pivot table?

  • @oholyzen9620
    @oholyzen96203 жыл бұрын

    Just discover your channel. I just wanted to know how to create a QR code for my landing page business and your video pop up first. thank you for what you are doing

  • @PratapSinghSoam
    @PratapSinghSoam2 жыл бұрын

    Thank You Mam 🙏🙏

  • @naaistam6879
    @naaistam68793 жыл бұрын

    She never failed me to say "WOW"👍

  • @hanshans8085
    @hanshans8085 Жыл бұрын

    Holy, you saved my day!

  • @dantetorres2960
    @dantetorres29603 жыл бұрын

    Nice one.

  • @vijayarjunwadkar
    @vijayarjunwadkar3 жыл бұрын

    FLATTENed by this trick, but appears that it is UNIQUE to Google Sheets! Wish we had it in Excel! Thanks Leila for sharing though, as we can bring the end results from Sheets to Excel anyway! Best of both!😊👍

  • @chinmaya.6934

    @chinmaya.6934

    3 жыл бұрын

    You can do this in Excel using Power Query. Append all columns and simple remove duplicates in PQ editor.

  • @vijayarjunwadkar

    @vijayarjunwadkar

    3 жыл бұрын

    @@chinmaya.6934 Thanks Chinmay!

  • @ash_m_
    @ash_m_3 жыл бұрын

    Thank you! Does this work in Excel too?

  • @chrism9037
    @chrism90373 жыл бұрын

    Awesome Leila!

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Thank you! 😄

  • @asmrindia
    @asmrindia Жыл бұрын

    Osum Video Mam, Very Useful to me and all. Thanks Please make a detailed video on Which is better between M.S. Office and Google Sheets. Thanks 😊

  • @jeremytan9143
    @jeremytan91433 жыл бұрын

    Thank you so much for this tutorial. I realised there is no flatten function in Excel. Is there an equivalent function for Excel?

  • @edwardburns220

    @edwardburns220

    2 жыл бұрын

    Hi! Use the =VSTACK formula in excel! Works pretty much the same as the flatten formula but you need to highlight each column and separate with a comma. Hope this helps.

  • @flashgenai

    @flashgenai

    2 жыл бұрын

    @@edwardburns220 I don't have vstack yet. I'm on office 365. Do you know any alternatives?

  • @vidhyashankarkannan4329

    @vidhyashankarkannan4329

    2 жыл бұрын

    Hi, I had the same issue. So I copied my data into google sheets, used Flatten, copied the result back to O365 and then used the functions in Excel to get the unique list.

  • @anujrana2634
    @anujrana26343 жыл бұрын

    Great video mam

  • @Zarwarians
    @Zarwarians2 жыл бұрын

    Thank you

  • @ChesscomWind
    @ChesscomWind Жыл бұрын

    You're a life saver madam! Thank you so much for this, it is EXACTLY what I was struggling with. ♥

  • @dicksongan
    @dicksongan2 жыл бұрын

    I wish you could have heard me scream when you whipped out the FLATTEN function that fixed the exact problem I was having. Thanks for the awesome tutorial!

  • @RogerStocker
    @RogerStocker3 жыл бұрын

    As usual absolute extraordinary nice new function, but too new for my company's setup.

  • @adnanobaidullah6057
    @adnanobaidullah60573 жыл бұрын

    Hi Leila , Thank you for videos. I would appreciate if make videos on VBA excel and SQL Server..

  • @berndeckenfels
    @berndeckenfels3 жыл бұрын

    Was looking for a good way to compare two lists to see, what is only in one, both or the other. (I typically do it with Unix „comp“ command)

  • @leonardoalvespereira9494
    @leonardoalvespereira94942 жыл бұрын

    I would like to say you I love you you made my day!!! Thank you!

  • @LeilaGharani

    @LeilaGharani

    2 жыл бұрын

    Glad I could help!

  • @TamerRagheb
    @TamerRagheb Жыл бұрын

    SWEET!

  • @lopher70
    @lopher703 жыл бұрын

    Thank you, which would be the similar of Flatten in Excel?, is there one?

  • @edersilvarodrigues
    @edersilvarodrigues3 жыл бұрын

    Obrigado 👏👏👏👏👏👏👏

  • @antonioclementemiari3822
    @antonioclementemiari38222 жыл бұрын

    Is there anything similar in Excel instead of Google sheets? Thank you so much for all your advices

  • @sivareddy3745
    @sivareddy37456 ай бұрын

    Nice Leila.

  • @geoschwa
    @geoschwa3 жыл бұрын

    Awesome, I’ve been joining arrays

  • @TIMUAU

    @TIMUAU

    2 жыл бұрын

    how?

  • @geoschwa

    @geoschwa

    2 жыл бұрын

    @@TIMUAU curly braces and commas,semicolons

  • @realpulsecoin
    @realpulsecoin3 жыл бұрын

    I'm flattered 😊

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    😊

  • @taizoondean689
    @taizoondean6893 жыл бұрын

    Thank you so much. What you suggest Excel or Google sheets. Please advise

  • @kranthireddy3392
    @kranthireddy33923 жыл бұрын

    Hi Lella.. Is there a formula to get the execution result for the same sheet that is updated daily on date basis..?

  • @charevir56
    @charevir568 күн бұрын

    Leila, I love it

  • @abdelkrimmesaiahmed662
    @abdelkrimmesaiahmed6623 жыл бұрын

    Thank you for this useful video but I want to ask if there is a formula in excel which do the same thing

  • @findthetruth3021
    @findthetruth30213 жыл бұрын

    Thank you so much for this amazing video, but I have an Excel sheet and using it for data collection and things I want from it which is really complicated and don't know how to get in touch with you and explain to you so that you can help me on that????. Is there any way to get in touch with you???. Thanks in advance.

  • @pieterkaruniadeo3494
    @pieterkaruniadeo34943 жыл бұрын

    Thanks

  • @decker55
    @decker553 жыл бұрын

    Leila you rule!

  • @JJ_TheGreat
    @JJ_TheGreat2 жыл бұрын

    Hi Leila, Question: What is the easiest way to find the Intersection of multiple (as in more than 2) columns in Excel? The UNIQUE function covers the Union, but we are still behind on Intersection. I feel that there should be a special function to do this! And then we also need a set minus function (as in set A-B, which is different than B-A). Could you do a video on this? Thank you.

  • @nikk3179
    @nikk31793 жыл бұрын

    Can we apply condional formatting - duplicate values ?

  • @TeamWebmekka
    @TeamWebmekka7 ай бұрын

    Great "show". It was VERY useful to me - AND I love your mug. Can I buy it somewhere?

  • @LeilaGharani

    @LeilaGharani

    7 ай бұрын

    Glad you like it! You can get our merch here: xelplus.creator-spring.com/

  • @anhnhatnguyet4628
    @anhnhatnguyet46283 жыл бұрын

    Great

  • @vida1719
    @vida17193 жыл бұрын

    Google sheets have some great functions. I wish Excel had more of these

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    So do I :)

  • @dinoc
    @dinoc3 жыл бұрын

    Is there a way to copy (automatically) data from one spreadsheet to another spreadsheet (both spreadsheets are online on the web on a sharepoint)? If yes, could you please do a video on this, too? :)

  • @junzhang6157
    @junzhang6157 Жыл бұрын

    FLATTEN does the job!!

  • @jecvman
    @jecvman3 жыл бұрын

    If someone is interested in doing this within Excel: With the System.Collections.ArrayList you could do the same(inlcudes the sorting part). You probably have to enable this object in the VBA library first. Put some data in Columns A, B and C and run this macro Sub Flatten_VBA() arr = Sheets(1).Cells(1).CurrentRegion With CreateObject("System.Collections.Arraylist") For Each cl In arr If Not .Contains(cl) Then .Add cl Next .Sort '.Reverse for Descending sort order Sheets(1).Cells(1, 6).Resize(.Count) = Application.Transpose(.toarray) End With End Sub And ofcourse Power Query can do this too very easily

  • @BasBruijnis

    @BasBruijnis

    3 жыл бұрын

    Hi, what is the reference called in the vba library?

  • @jecvman

    @jecvman

    3 жыл бұрын

    @@BasBruijnis Maybe you don't need it. Try to find: mscorlib.dll

  • @jecvman

    @jecvman

    3 жыл бұрын

    Function without object: Function Flat_sort(rng As Range) ar = rng Dim a() For Each cl In ar If cl "" Then ReDim Preserve a(j) a(j) = cl j = j + 1 End If Next For i = 0 To UBound(a) For j = i + 1 To UBound(a) If a(j) y = a(i) a(i) = a(j) a(j) = y End If Next Next Flat_sort = Application.Transpose(a) End Function

  • @cenevspeed
    @cenevspeed3 жыл бұрын

    Could you please tell me which editing software you use??

  • @mlittlemlittle2966

    @mlittlemlittle2966

    3 жыл бұрын

    This is Google sheets, it is not an editing software, I don't think

  • @gmscott9319

    @gmscott9319

    3 жыл бұрын

    @@mlittlemlittle2966 I wonder if they meant which video editing software.

  • @mlittlemlittle2966

    @mlittlemlittle2966

    3 жыл бұрын

    @@gmscott9319 oh. Makes more since. I was misled by the phrasing regarding the spirit of the question

  • @LeilaGharani

    @LeilaGharani

    3 жыл бұрын

    Mostly Camtasia.

  • @cenevspeed

    @cenevspeed

    3 жыл бұрын

    @@LeilaGharani thanks for telling

  • @josepepe741
    @josepepe7412 жыл бұрын

    Do we have any equivalent formula in Excel? How the same can be achieved in Excel with formulas?

  • @TarunAgarwalVastu-Dubai
    @TarunAgarwalVastu-Dubai2 жыл бұрын

    Hi Leila, Everyone does not have office 365 , I am using Excel 2013 as provided by my office. How can I sort this in that ??

  • @parshwamehta6108
    @parshwamehta6108 Жыл бұрын

    First of all, Thank you so much. I have a question here: Once this Unique list is ready, can we use same values/column and apply VLOOKUP value here? For example: In this video, I use VLOOKUP value from column G. Thanks in advance.

  • @real5731
    @real57312 жыл бұрын

    I am flattened.... There should be option to like it multiple times 👍👍👍👍

  • @sod_norway
    @sod_norway Жыл бұрын

    I'm using office 365, primarily excel, creating dynamic queries with msqry. Looking into Power query due to enhanced complexity

  • @dhananjayabhyankar5773
    @dhananjayabhyankar57733 жыл бұрын

    If Horizontal array data and to be convert in one column from data one column after next column data. How it can be done with flatten command? Is there possible to use Flatten command in excel

  • @shantiarichards1012
    @shantiarichards101210 ай бұрын

    Hi. I need to filter a pivot table based on unique values of a particular columns data in google sheets. Can you help?

  • @t.wilson
    @t.wilson11 ай бұрын

    Great tip! I don't know if arrayformulas didn't exist at this time, but you can recreate this for combinations of columns using =UNIQUE({range1;range2;range3}) which appends the ranges and then uniques them. I assume you could use arrays{} in this case as well in place of flatten?

  • @socialgamer23

    @socialgamer23

    7 ай бұрын

    why doesn't it work for me? I am getting 'There is a problem with this formula error'. The formula used "=UNIQUE({Z3:Z6;Z3:Z7})" Can you help here? Coz my excel doesn't seem to have flatten either.

  • @t.wilson

    @t.wilson

    6 ай бұрын

    @@socialgamer23 ​ This is for google sheets. Excel requires a different solution to my knowledge due to the array argument. However, with your example, you do not need an array. You can use =UNIQUE(Z3:Z7) alone. Hope that helps!

  • @t.wilson

    @t.wilson

    6 ай бұрын

    @socialgamer23 You can also use =UNIQUE(TOCOL(array of data)

  • @socialgamer23

    @socialgamer23

    6 ай бұрын

    Thanks all! I used VSTACK.

  • @harmetup3tegal126
    @harmetup3tegal1263 ай бұрын

    makasih

Келесі