Google SpreadSheet Query: Can I remove column header?

前端 未结 6 1991
执笔经年
执笔经年 2020-12-12 18:35

I\'m doing this query at my google spreadsheet:

=QUERY(H4:L35;\"select sum(L) where H=\'First Week\'\"; -1)

But it returns a little table w

相关标签:
6条回答
  • 2020-12-12 19:05
    =INDEX(QUERY(H4:L35;"select sum(L) where H='First Week'"; -1),2,1)
    

    This just parses the returned array and selects the 2nd record returned in the first column.

    You can also do this with the filter function which is less compute intensive.

    =SUM(FILTER(L4:L35, H4:H35 = "First Week"))
    
    0 讨论(0)
  • 2020-12-12 19:16

    I have a QUERY which is returning the top 3. I could not get this to work when returning multiple rows. I ended up just hiding the row with the formula and only the answers show now.

    0 讨论(0)
  • 2020-12-12 19:19

    Instead of labeling column names as blanks using '', you can omit all headers like this:

    =QUERY(H4:L35,"select sum(L) where H='First Week'", 0)

    0 讨论(0)
  • 2020-12-12 19:20

    Try this:

    =QUERY(H4:L35,"select sum(L) where H='First Week' label sum(L) ''")
    

    Hope that Helps!

    0 讨论(0)
  • 2020-12-12 19:20

    =QUERY(QUERY(A1:D, "SELECT *", 1), "SELECT * OFFSET 1", 0)

    The outer query: "SELECT * OFFSET 1" excludes the first row (the header).

    The inner query explicitly specifies one row of headers (via the third argument supplied to QUERY), whilst the outer query specifies none.

    0 讨论(0)
  • 2020-12-12 19:21

    See the format here.

    Example:

    =QUERY(B4:C38,
       "SELECT C, sum(B) where C!='' group by C label C 'Member', sum(B) 'Sum'"
    )
    
    0 讨论(0)
提交回复
热议问题