1

I saw this post about Google Apps Script - Copy row from table if value in table meets condition. Is there any way to do the same with gsheet formula and not apps script?

Ken White
  • 123,280
  • 14
  • 225
  • 444
Elad Benda
  • 35,076
  • 87
  • 265
  • 471

1 Answers1

3

You can try with QUERY or FILTER approach.

Query:

  • =query({A2:C5}, "select * where Col1='A'")

Filter:

  • =filter(A2:C5, A2:A5 = "A")

Outputs:

output

Note:

  • I recommend using filter if data is simpler and can be written as a single range.
  • I recommend using query for complicated/composite data via combining columns coming from different sheets, or columns not beside each other and needs to be put into array (e.g. {A1:A, C1:C}, etc.)
NightEye
  • 10,634
  • 2
  • 5
  • 24