I am trying to get a column in Google Sheets to display the values produced by another column but if they are greater than 10, I want it to just display 10 for that cell but if the cell would contain a number less than 10 that cell within the column still contains the original value.
I tried a query with an IF statement but I'll admit I'm too sure how this works
=query(D:D,"select D label D 'Your total points'" & IF("D">10,10,"D"),1)
I expected a new column to list all the values in column D unless they were greater than 10. If they were greater than 10, I expected the cell to contain the value 10 instead of the original value of the corresponding cell in column D.
Instead I get the following error:
Unable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "10 "" at line 1, column 37. Was expecting one of: "format" ... "options" ... "," ...
Aucun commentaire:
Enregistrer un commentaire