Search code examples
google-sheetsgoogle-sheets-formula

Query with multiple data types


I need to find a query that filters through a table with multiple data types.
Problem is that i cant find a way for the query to ignore anything that isnt a number.
I also cant limit what data gets input into the table.

The table in question looks like this:

Name (COL B) Data (COL F)
Max Mustermann 15
Jon Smith A
James Brown 1
Robert Miller 5
Linda Williams 🌟

The query should filter out any data that isnt a number and ignore it.
The data that is a number should be ordered descending.

The table should look like this after the query ran:

Name Data
Max Mustermann 15
Robert Miller 5
James Brown 1

I tried working around it with ARRAYFORMULA and isnumber but i just cant get it working.


Solution

  • Use ISNUMBER() as Basis for Filtering

    You may use ISNUMBER() like this:

    =FILTER(HSTACK(B2:B,F2:F),ISNUMBER(F2:F))

    Reference: