How To Use Column Names in the QUERY Function (Google Sheets Tutorial)

Sdílet
Vložit
  • čas přidán 13. 09. 2024

Komentáře • 23

  • @trumanchau7884
    @trumanchau7884 Před 21 dnem

    I have improvised Ben's approach to simplify the query formula entry by creating two helper rows with the header names and the "Col#" reference derived from the XMATCH equation. Instead of calling out individual headernames in the select statement, the formula simplifies to: =query(RangeName,"select "&TEXTJOIN(", ",TRUE,A2:F2)&"") where A2:F2 stores the "Col#" results.

  • @trumanchau7884
    @trumanchau7884 Před 21 dnem

    Ben Collins, you are amazing! You have provided the most elegant, simplest, and easy to implement workaround to one of the epic fails in gSheets. I hope that you can influence Google Product team to address this obvious blunder where one cannot simply query using header names.

  • @DrewK1979
    @DrewK1979 Před 29 dny

    Great tutorial, this helped simplify a rostering system I built for a non-profit - well done!

  • @Aaron-3das
    @Aaron-3das Před 2 měsíci

    EXACTLY what I needed! Thank you!

  • @johnagusta6149
    @johnagusta6149 Před 8 měsíci +2

    Thanks Ben, a pretty simple solution. As you are aware, I developed a solution as well and used Named Functions to simplify the implementation.

    • @benlcollins
      @benlcollins  Před 8 měsíci

      Yes, I remember. Using named functions is a smart idea anytime you reuse complex functions over and over. Happy New Year!

    • @KevnReid
      @KevnReid Před 8 měsíci +1

      I would love to have access to this Named Function! Do you mind sharing the code or point me to where you have it?

    • @AndrewMalcolmson
      @AndrewMalcolmson Před 8 měsíci

      @@KevnReid Try "=concat("Col",xmatch(header_name,headers))" where header_name is the function's header name argument (e.g. "Total Sales").

  • @mircopolo
    @mircopolo Před 3 měsíci

    Wow you fixed what Google Sheets were missing on QUERY :D

  • @brianandrewsmusic
    @brianandrewsmusic Před 8 měsíci

    Thanks Ben! Something tells me this will become my favorite CZcams channel...

    • @benlcollins
      @benlcollins  Před 8 měsíci

      Thanks! Appreciate your support 🙏

  • @rohitbhandari6382
    @rohitbhandari6382 Před 16 dny

    Nice sr thanks

  • @rohitbhandari6382
    @rohitbhandari6382 Před 5 dny

    I am trying to grab data from different work sheet the xmatch isn't working. Its saying the range name is unknown.

  • @mooripo
    @mooripo Před měsícem

    aamazing thanks

  • @ganeshshelkar4333
    @ganeshshelkar4333 Před 8 měsíci +2

    Woww best video sir🎉🎉

  • @monologuesofaconsultant
    @monologuesofaconsultant Před 8 měsíci

    Very interesting application. Thank you.

  • @TheDervMan
    @TheDervMan Před 8 měsíci +1

    Nice 👍🏻

  • @asadiqbal1058
    @asadiqbal1058 Před 7 měsíci

    header keyword is not working

  • @ibrahimosama9300
    @ibrahimosama9300 Před 8 měsíci

    i just protect the headers 😅