# Sort value according to another column

I have a Google Spreadsheets prepared: example sheet and in column `I`, I want to list every player in column `B` if the value in column `C` is `Beta`.

What formula do I need to use in column I?

Not sure of the meaning of sort in the title of the question, but to get the requirement in the text of your question, in cell `I2` enter

``````=query(A2:C16, "select B where C = 'Beta'")
``````

You might want to change the query range to include more rows.

If you want the list sorted, enter instead:

``````=sort(query(A2:C16, "select B where C = 'Beta'"))
``````

Also, it looks like that sheet is attached to a form. I recommend you do calculations (use formulas) in another sheet not associated with a form.

• @user36867 Welcome to webapps SE. Please upvote if you find the answer useful and eventually mark the answer correct if it answers your question. – Fuhrmanator Mar 23 '13 at 16:40

An alternative to the answer already given, is the following formula in `I2`:

``````=ARRAYFORMULA(FILTER(B2:B;C2:C="Beta"))
``````

If there are more then one entries to expect, add the following formula:

``````=UNIQUE(ARRAYFORMULA(FILTER(B2:B;C2:C="Beta")))
``````

Sorting the range can be done with the sort function:

``````=SORT(ARRAYFORMULA(FILTER(B2:B;C2:C="Beta")),1,TRUE)
``````

The `1` in the sort represents the first and only column. The `TRUE` will sort the range ascendingly and `FALSE` will sort it descendingly.