Home > Software engineering >  How to put number in google sheet query
How to put number in google sheet query

Time:12-21

I want to do a query in google sheet something like:

=query({BY6:CH29},"
select Col2,sum(Col5*Col9*{144}/Col4),sum(Col5*Col10*{144}/Col4),sum(Col7*Col9*{144}/Col4),sum(Col7*Col10*{144}/Col4) 
where Col2 is not null
group by Col2 
order by Col1 
",1)

How do I do it? I think the number 144 made the formula error

the query return #VALUE! Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "" " "" at line 2, column 21. Was expecting: ")" ...

CodePudding user response:

Try this:

=query({BY6:CH29},"
select Col1, Col2,SUM(Col5)*SUM(Col9)*144/SUM(Col4),SUM(Col5)*SUM(Col10)*144/SUM(Col4),sum(Col7)*SUM(Col9)*144/SUM(Col4),sum(Col7)*SUM(Col10)*144/SUM(Col4) 
where Col2 is not null
group by Col2,Col1  
order by Col1 
",1)
  • Related