Google SpreadSheet Query: Can I remove column header?

為{幸葍}努か 提交于 2019-12-18 10:14:41

问题


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 with "sum" as header and result below it. What I want is just the result! How I remove header? Can I?


回答1:


Try this:

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

Hope that Helps!




回答2:


=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.




回答3:


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.




回答4:


=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"))



回答5:


See the format here.

Example:

=QUERY(B4:C38,
   "SELECT C, sum(B) where C!='' group by C label C 'Member', sum(B) 'Sum'"
)


来源:https://stackoverflow.com/questions/26867775/google-spreadsheet-query-can-i-remove-column-header

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!