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

Поделиться
HTML-код
  • Опубликовано: 28 ноя 2024

Комментарии • 25

  • @trumanchau7884
    @trumanchau7884 3 месяца назад

    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.

  • @josephcruz4736
    @josephcruz4736 Месяц назад

    This is amazing, Ben Collins! I just found your channel on how to start with App Script, and I discovered this helpful video on using complex formulas. This will definitely boost my productivity at work. Thank you so much!

  • @brianandrewsmusic
    @brianandrewsmusic 10 месяцев назад

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

    • @benlcollins
      @benlcollins  10 месяцев назад

      Thanks! Appreciate your support 🙏

  • @MilesDaffin
    @MilesDaffin 25 дней назад

    Great, clear video Ben. Thanks. But what a kerfuffle. The optimal solution would be to just use the column names, and it would keep the code so much shorter and clearer. Do you know if Google are planning to enable this feature in query strings any time soon?

  • @trumanchau7884
    @trumanchau7884 3 месяца назад

    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 3 месяца назад

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

  • @johnagusta6149
    @johnagusta6149 10 месяцев назад +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  10 месяцев назад

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

    • @KevnReid
      @KevnReid 10 месяцев назад +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 10 месяцев назад

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

  • @mircopolo
    @mircopolo 6 месяцев назад

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

  • @ganeshshelkar4333
    @ganeshshelkar4333 11 месяцев назад +2

    Woww best video sir🎉🎉

  • @Aaron-3das
    @Aaron-3das 5 месяцев назад

    EXACTLY what I needed! Thank you!

  • @rohitbhandari6382
    @rohitbhandari6382 2 месяца назад

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

  • @monologuesofaconsultant
    @monologuesofaconsultant 10 месяцев назад

    Very interesting application. Thank you.

    • @benlcollins
      @benlcollins  10 месяцев назад

      Thanks. You're welcome.

  • @rohitbhandari6382
    @rohitbhandari6382 3 месяца назад

    Nice sr thanks

  • @TheDervMan
    @TheDervMan 11 месяцев назад +1

    Nice 👍🏻

  • @mooripo
    @mooripo 4 месяца назад

    aamazing thanks

  • @asadiqbal1058
    @asadiqbal1058 10 месяцев назад

    header keyword is not working

  • @ibrahimosama9300
    @ibrahimosama9300 11 месяцев назад

    i just protect the headers 😅