# Need to create a formula with the operand in a different cell in Google Sheets

For eg .

Existing formula which works
Query(A4:K,"Select A Where I = > 0.3")

should be replaced by
Query(A4:K,"Select A Where I = "&N1&"")

with cell N1 containing value '>0.3'

Appreciate any help

• No, `Query(A4:K,"Select A Where I = > 30%")` does not work. Dec 15, 2019 at 22:16
• How abt this Query(A4:K,"Select A Where I = > 0.3") Dec 16, 2019 at 3:27
• Thanks for the link, but not sure what to do Dec 17, 2019 at 2:19

## 1 Answer

`= >` is not a valid operator the following operators are valid `<=, <, >, >=, =, !=, <>`

Your first code should look like this

``````Query(A4:K,"Select A Where I >= 0.3")
``````

Your second code would look like this (Assuming N1 contains `>0.3`)

``````Query(A4:K,"Select A Where I "&N1)
``````

https://developers.google.com/chart/interactive/docs/querylanguage

• Tried it that doesnt seem to work, heres the link to the file, hoping you can identify the issue. Code is in the first sheet on Line M4 to Q4 docs.google.com/spreadsheets/d/… Dec 17, 2019 at 5:05
• It is working fine, the output is showing #N/A because there is nothing to return you have all 0% Dec 17, 2019 at 6:11
• it showing #value, unable to parse query string. there are several row which have value greater than 33% in the column . try someother value , error still remains Dec 17, 2019 at 8:12
• see cell Q4, have made the change there Dec 17, 2019 at 8:21
• @VikramChander I just looked at your sheet, you need to read the first sentence of my answer, `= >` is not a valid operator the following operators are valid `<=, <, >, >=, =, !=, <>` Dec 17, 2019 at 14:57