Google-sheets – filter or sort Google Spreadsheet based on condition

google sheetsgoogle-sheets-query

I have an 8 column spreadsheet.

I want to sort/filter based upon the value of the 4th column.

In a separate sheet within the same spreadsheet, I want to print a list of each row matching a speific condition set for that 4th column. That condition is if the 4th column value of a specific row is anything but zero (numbers).

In the separate sheet, I want to print a list of rows matching this condition, the third column of my original list containing the data from the the original sheet. In the second column, I want to print the value of the filter/sort field, the value that is in that 4th column of the original sheet.

In summary:

Sheet1: 4th column (is it anything other than zero, if so):

Sheet2: 2 columns, 1st column containing value of 3rd column from Sheet1, 2nd column containing the value from the 4th column of Sheet1.

No specific sort order needed, but definitely want to meet the specifications in the Summary above.

I have tried using =sort(Sheet1!C:D, 2, FALSE), but this prints a list of all rows, even the ones containing zero.

Best Answer

I've added the result of your question in the Google Spreadsheet you shared with us.
In the SUMMARY sheet I collected all data that fits the criterion D<>0, with the following formula:

=QUERY(DATA!A:D;"SELECT A,C,D WHERE D<>0")

I also added an ID number, for the two companies and added the column to the summary sheet. As you can see, this formula can be easily extended.