Home > OS >  How to filter a google sheet or excel table where only those rows are included where at least one of
How to filter a google sheet or excel table where only those rows are included where at least one of

Time:02-03

Consider this table:

Col1 Col2 Col3 Col4
1 s
2
3 s

What's the filter formula (or any other formula for that matter) so that it will only retain the rows if any of the cells from col2 to col4 is not empty?

So the output should be:

Col1 Col2 Col3 Col4
1 s
3 s

Google sheet sample here https://docs.google.com/spreadsheets/d/1ugIbzetQGb0IV32iE0aG49wEK1xSuFLHqDUnzoLnGnM/edit?usp=sharing

Thanks! Much appreciated.

CodePudding user response:

One option for Google Sheets:

=FILTER(A1:D4,BYROW(B1:D4,LAMBDA(x,COUNTIF(x,"?*"))))

For ms365:

=FILTER(IF(A1:D4="","",A1:D4),BYROW(B1:D4,LAMBDA(x,SUM(--(x<>"")))))
  • Related