Select columns by name rather than letter in Google Query Language (GQL) with Google Spreadsheets?

前端 未结 3 1593
时光取名叫无心
时光取名叫无心 2021-01-02 15:37

newbie question, is it possible to select columns by name rather than letter when using Google Query Language with Google Spreadsheets?

This works fine for me: \"S

3条回答
  •  一向
    一向 (楼主)
    2021-01-02 16:08

    A little simpler:

    SELECT "&SUBSTITUTE(ADDRESS(1,MATCH("student",Sheet1!A1:B1,0),4),1,"")&", COUNT("&SUBSTITUTE(ADDRESS(1,MATCH("detention",Sheet1!A1:B1,0),4),1,"")&") GROUP BY "&SUBSTITUTE(ADDRESS(1,MATCH("student",Sheet1!A1:B1,0),4),1,"")
    
    • Example in Google Sheets
    • Detailed explanation

提交回复
热议问题