Google Sheets - Query IN List Like SQL or Many ORs Using a Range Tutorial - Part 7

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Learn how to create SQL like IN statement in QUERY function available in Google Sheets using join logic.

КОМЕНТАРІ • 46

  • @blackandDecker22
    @blackandDecker22 6 років тому +7

    Thanks a lot man, I spent 4 hours yesterday trying to figure out how to query/filter based on values of a list and that dynamic thing you built there was perfect. If I could like this video 10000000 times I would.

  • @badmazafaker3454
    @badmazafaker3454 5 років тому +4

    Interesting approach, thanks for sharing it! There's a simpler way, however. The next function will do the same: =FILTER(Transactions!$A$1:$L, MATCH(Transactions!$A$1:$D, A$2:$A$9,0))

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  5 років тому +7

      I have that in FILTER video, but this is QUERY series.

  • @samoht76
    @samoht76 6 років тому +2

    Thank you, you made me realize that there are so many ways to cheat in google sheets. A real eye opener!

  • @danmakemoneyonline
    @danmakemoneyonline 5 років тому +2

    This saved me hours of researching. Thanks a great deal!

  • @santsangwornrachasup6613
    @santsangwornrachasup6613 Рік тому

    Thanks a million!! This knowledge never gets old.

  • @gabrielmartinphilot980
    @gabrielmartinphilot980 3 роки тому +2

    God bless your family

  • @j53iliff2
    @j53iliff2 2 роки тому

    Like always, right on the money! Just what I was needing.

  • @HenryDara1
    @HenryDara1 4 роки тому +1

    Thank you for your great videos, they are the very best available. I like using query in place of formula drive functions, but wonder if one way is better as far as processing speed. Can I go too far with queries, or is it a case by case kind of thing? Thanks again.

  • @mochannel2482
    @mochannel2482 9 місяців тому

    Fantastic job

  • @leopolon
    @leopolon 6 років тому +1

    Amazing tutorial. Thank you a lot. You are really tacking a lot o important issues for full functionality of google query. Please keep up! May i ask a question? Since google query lacks FROM clause. Can you think of any other way to tackle it besides joining tables with match/index or Vlookup?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому +2

      At this point there is no JOIN like SQL, so we'll have to stick with regular lookups for this.

  • @lafamillecarrington
    @lafamillecarrington Рік тому

    Interesting idea, well explained - can't imagine ever using it though!

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  Рік тому

      As with any other function, it's useful when you need it :)

  • @WasanKhunnadiloksawet
    @WasanKhunnadiloksawet 5 років тому +1

    This is what I want . THANKS

  • @roberth.2779
    @roberth.2779 6 років тому

    Exactly what I was looking for. One question though. You mentioned in the very last minute if I use numbers instead of text I need to remove the a apostrophes - I kind of struggle with it. Can you put your final formula without those?

  • @Mark-h1q1e
    @Mark-h1q1e 11 місяців тому

    how would I go about adding another argument. for example Where Col2 / B "Kyle Cruz"
    I'm wanting to importrange where everything is relevant to the query but ignore data with certain criteria.

  • @minhphan1841
    @minhphan1841 2 роки тому

    Can I use join syntax in google sheet sir. Not the combination of query & vlookup.

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  2 роки тому

      No, query function doesn't support joins. At least not at the moment.

  • @nimajnebonabar9710
    @nimajnebonabar9710 Рік тому

    how can i troubleshoot if this doesnt work anymore on my file?
    the other day it reflects normally but suddenly today it doesnt work as intended, i tried changing it to an array as well but nothing happened

  • @LukaszKawalec
    @LukaszKawalec 6 років тому +1

    Great tutorial! Thanks! How about extracting the same data, but from another worksheet? How to do it?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому +2

      Not exactly sure what you mean, but probably IMPORTRANGE function is what you need. I have a video on it.

    • @LukaszKawalec
      @LukaszKawalec 6 років тому +1

      I mean if your "Transaction" sheet would be in another workbook...Would it be something like this?: =IMORTRANGE(QUERY(Transactions!$A$1:$L$20001, ”SELECT A, B, C, D, F WHERE D = ' " & TEXTJOIN(" ' OR D = ' " , TRUE,A2:A9)&” ’ ”,1))

    • @leopolon
      @leopolon 6 років тому +1

      That is the spirit! However, you will need to use "SELECT Col1, Col2, Col3, Col4, Col6 WHERE Col4 = ..." instead of letters. (it is a must to type Col1, not col1 or COL1, k?)
      Moreover, the IMPORTRANGE functions has 2 arguments: URL and range. So it will be more like:
      =QUERY(IMPORTRANGE("[your spreadsheet URL here]","[the range you want to import]";"SELECT...."

    • @LukaszKawalec
      @LukaszKawalec 6 років тому +1

      +Leonardo Polon Thanks!

  • @amolparbat6428
    @amolparbat6428 3 роки тому

    Had a quick question on Query ....I have data in which one column has number format as " AB12234" when I use query function it's gives put as " " can you please provide resolution for this .... thank you

  • @MrLeanLogistics
    @MrLeanLogistics 4 роки тому

    Hello, It's a great video. I need this formula but with opposite, so I need data what it are not in the list. Can you help me?

    • @MrLeanLogistics
      @MrLeanLogistics 4 роки тому

      I found a solution I use AND operator in TEXTJOIN instead of OR...

  • @cuneiformscript2665
    @cuneiformscript2665 4 роки тому

    🙏🏻

  • @westonschild2596
    @westonschild2596 5 років тому

    Does this still work in sheets? I can't get this to cooperate for the life of me. Values will return only if copied to multiple cells and they don't seem to be updating when source data is changed.

  • @mbany92
    @mbany92 4 роки тому

    Can the reverse be done? Is it possible to say “where not D =“ or “D ” in order pull data but exclude ones that match a particular column? I just tried it and it’s not working for me for some reason

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      WHERE D != 'something' or WHERE D 'something' both should work.

    • @mbany92
      @mbany92 4 роки тому

      @@ExcelGoogleSheets Didn't work for some reason. The only thing that worked was "where not D matches '" & TEXTJOIN("' AND NOT D matches '",TRUE,K3:K)&"'" Even with my formula, if I switch the "AND" to "OR" makes my formula not work. Do you know why that might be?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  4 роки тому

      matches means you use regular expression, so there might be spaces before and after in your data, also QUERY is by default case sensitive, so if you type APPLE it will not match Apple.

  • @lazalazarevic6192
    @lazalazarevic6192 6 років тому

    #cheeky

  • @alibirouti7193
    @alibirouti7193 5 років тому

    thank you

  • @Bochagmo
    @Bochagmo 6 років тому

    Hi !
    Thanks for the tutorial its very usefull. But (always there is a "but") i have problem
    How can i make a join 3 tables like:
    ..........Table PERSONS...................
    IdPerson,name,age
    1,Tom,15
    2,Nicolas,20
    3,John,22
    .........Table PROFESSIONS............
    IdJob,jobName,hoursPerWeek
    20,tech,6
    21,teacher,4
    22,poet,10
    ......PERSONS IN PROFESSIONS...
    IdPerson, IdJob
    1,20
    1,21
    2,22
    2,20
    3,22
    .........................................................
    And i need to see all the people's work(and other colums) like:
    name,jobName
    Tom,Tech
    Tom,Teacher
    Nicolas,Poet
    Nicolas,Tech
    John,Poet
    Can you help me ?
    Thanks for your time

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      At this point you will need to write a script for this. It's not going to be simple.

    • @Bochagmo
      @Bochagmo 6 років тому

      @@ExcelGoogleSheets :( Ok, i will look for a solution.it has to be done.
      Anyway, thanks for your help !!

  • @davidmackey6540
    @davidmackey6540 6 років тому

    I wonder if you can help me with the following "challenge"
    Col1 is Status
    Col2 is Value
    Col3 is a url
    I want to parse out values from the url in Col3 that contains utm parameters.
    The url looks like this:
    xyz.com.au/?Google&NSW&Air&gclid=EAIaIQobChMIqqWxqs_J2QIVxhWPCh2iQgFLEAAYASAAEgKcHvD_BwE
    There are a number of known variables for:
    source
    medium
    campaign
    content
    I want parse out the 4 values from the url in Col3 and use those values to create a pivot table with the values from Col1 and Col2.
    In other words, starting with 3 columns I want to end with:
    Col1 Status
    Col2 Value
    Col3 source
    Col4 medium
    Col5 campaign
    Col6 content
    Hopefully that makes sense?

    • @ExcelGoogleSheets
      @ExcelGoogleSheets  6 років тому

      I would you regexextract function for that. I have several videos on Sheets regex functions.

  • @sbhanuprakash9
    @sbhanuprakash9 4 роки тому

    Hello Sir, I'm tired resolving this when I'm retrieving the data from another sheet. The list is displayed like this:
    M. Dedeepya Pinki Kumari Kalyani Sheena Evelyn Mula Aarthi Pandre Maheshwari
    Mustafa Ahmed
    Srinath Lekkala
    Phanindra Babu
    Akhil Dulam
    I should get the names as a list one below the other. Like this
    M. Dedeepya
    Pinki
    Kumari
    Kalyani
    Sheena Evelyn Mula
    Aarthi Pandre
    Maheshwari
    Mustafa Ahmed
    Srinath Lekkala
    Phanindra Babu
    Akhil Dulam
    Could you please help me out...

  • @starvinmcmarvin
    @starvinmcmarvin 5 років тому

    dude if you did this video with a growly voice you would sound like strong bad. :)