Okay, you're hitting a common point of confusion with FILTER.
The FILTER function in Google Sheets is designed to filter rows based on conditions you provide. It returns the entire row from the specified range where the conditions are met. It doesn't have a built-in way to exclude specific columns from its output.
To achieve the result of filtering rows and excluding columns, you typically need to combine FILTER with another technique, or often, use a more powerful function designed for both tasks, like QUERY.
Here are the common ways to do this:
Method 1: Use QUERY (Recommended)
QUERY is often the simplest and most flexible function for selecting data, filtering rows, and selecting/reordering columns all at once.
Syntax:QUERY(data, query, [headers])
How it works for your goal: You use the SELECT clause to specify which columns you want to include (thereby excluding others), and the WHERE clause to specify your row filtering condition.
Example:
Let's say your data is in A1:D100, and you want to:
Exclude column B.
Keep columns A, C, and D.
Filter rows where the value in column C is greater than 50.
The QUERY formula would be:
excel
=QUERY(A1:D100, "SELECT A, C, D WHERE C > 50")
A1:D100: This is your data range.
"SELECT A, C, D WHERE C > 50": This is your query string.
SELECT A, C, D: Specifies to only return columns A, C, and D from the input range. Column B is excluded by simply not listing it.
WHERE C > 50: Specifies the condition for filtering rows. Only rows where the value in column C is greater than 50 will be returned.
Method 2: Combine FILTER with Array Literals {}
You can use array literals {} to build a new range before feeding it into FILTER. This new range will contain only the columns you want.
How it works: You create a virtual array using {} by listing the columns you want to keep, separated by commas (for columns side-by-side). Then, you apply FILTER to this virtual array. The filter condition must reference the columns based on their position in the new array.
Example:
Using the same scenario: data in A1:D100, exclude B, keep A, C, D, filter where C > 50.
Build the new array excluding column B:{A1:A100, C1:C100, D1:D100} - This creates a virtual range consisting of column A, followed by column C, followed by column D.
Apply FILTER to this new array:
The filter condition needs to refer to the columns in the new array structure. Original column C is now the second column in the {A, C, D} array.
{A1:A100, C1:C100, D1:D100}: This is the range for the FILTER function. It's the data with column B already excluded.
C1:C100 > 50: This is the condition for the FILTER. Important: Even though we built a new array, the condition usually needs to refer back to the original range's column that holds the filter criteria (unless you structure the condition carefully to match the new array's column index). In this case, the condition C1:C100 > 50 correctly references the original column C, which is part of the new array as the second column.
Which method to choose?
QUERY is generally more powerful and easier when you need to do both row filtering and column selection/reordering. Its syntax is very clear for this purpose.
FILTER + {} is useful if you are already using FILTER for complex row logic and just need to tweak which columns show up, or if you prefer the FILTER syntax for the row conditions. However, mapping the condition back to the correct column reference when using {} can sometimes be tricky.
For simply filtering rows and excluding a column, QUERY is usually the recommended approach.