Filter: Besides returning the column I want, it also returns the column with the condition, which I do not want

I have successfully extracted data from Column A based on a condition in column D. But Sheets returns column D as well where the conditions has been met. I don’t need column D. It interferes.

That’s my function: =Filter(Addresses!A2:K600,Addresses!D2:D600=1). All I want are the values in column A, not have Column D repeated

1

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>=filter(Addresses!A2:A600,--(Addresses!D2:D600 = 1))
</code>
<code>=filter(Addresses!A2:A600,--(Addresses!D2:D600 = 1)) </code>
=filter(Addresses!A2:A600,--(Addresses!D2:D600 = 1))

Should only filter on the values you actually want.

Filter Data Without Filter Column

  • You started your post letting one to believe that you wanted to filter your data excluding the filter column. If that’s the case, you could do the following.

Readable and Maintainable

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
c,SEQUENCE(COLUMNS(data)),
s,FILTER(c,c<>filter_column),
f,CHOOSECOLS(data,filter_column)=criterion,
r,FILTER(CHOOSECOLS(data,s),f),
r)
</code>
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1, c,SEQUENCE(COLUMNS(data)), s,FILTER(c,c<>filter_column), f,CHOOSECOLS(data,filter_column)=criterion, r,FILTER(CHOOSECOLS(data,s),f), r) </code>
=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
    c,SEQUENCE(COLUMNS(data)),
    s,FILTER(c,c<>filter_column),
    f,CHOOSECOLS(data,filter_column)=criterion,
    r,FILTER(CHOOSECOLS(data,s),f),
    r)

Alternatively, you could use s,TOROW(IFS(c<>filter_column,c),2),.

Compact

(After Removing the Redundant s, f and r Variables)

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
c,SEQUENCE(COLUMNS(data)),
FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)),
CHOOSECOLS(data,filter_column)=criterion))
</code>
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1, c,SEQUENCE(COLUMNS(data)), FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)), CHOOSECOLS(data,filter_column)=criterion)) </code>
=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
    c,SEQUENCE(COLUMNS(data)),
    FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)),
        CHOOSECOLS(data,filter_column)=criterion))

LAMBDA function

  • With a few simple changes (first line and trailing parentheses), you could create a LAMDBA formula…

    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    <code> =LAMBDA(data,filter_column,criterion,LET(
    c,SEQUENCE(COLUMNS(data)),
    FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)),
    CHOOSECOLS(data,filter_column)=criterion)))
    </code>
    <code> =LAMBDA(data,filter_column,criterion,LET( c,SEQUENCE(COLUMNS(data)), FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)), CHOOSECOLS(data,filter_column)=criterion))) </code>
     =LAMBDA(data,filter_column,criterion,LET(
         c,SEQUENCE(COLUMNS(data)),
         FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)),
             CHOOSECOLS(data,filter_column)=criterion)))
    

    … to use it in the Name Manager to create your own LAMBDA function and e.g. name it FilterNFC.

  • Then you could use it as any other Excel function anywhere in the workbook:

    Plain text
    Copy to clipboard
    Open code in new window
    EnlighterJS 3 Syntax Highlighter
    <code> =FilterNFC(Addresses!A2:G6,4,1)
    </code>
    <code> =FilterNFC(Addresses!A2:G6,4,1) </code>
     =FilterNFC(Addresses!A2:G6,4,1)
    

Google Sheets

  • Here’s a link to Filter No Filter Column on my Google Drive.
  • I got it to work by slipping in an ARRAYFORMULA for the f variable.
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
c,SEQUENCE(COLUMNS(data)),
s,FILTER(c,c<>filter_column),
f,ARRAYFORMULA(CHOOSECOLS(data,filter_column)=criterion),
r,FILTER(CHOOSECOLS(data,s),f),
r)
</code>
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1, c,SEQUENCE(COLUMNS(data)), s,FILTER(c,c<>filter_column), f,ARRAYFORMULA(CHOOSECOLS(data,filter_column)=criterion), r,FILTER(CHOOSECOLS(data,s),f), r) </code>
=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
    c,SEQUENCE(COLUMNS(data)),
    s,FILTER(c,c<>filter_column),
    f,ARRAYFORMULA(CHOOSECOLS(data,filter_column)=criterion),
    r,FILTER(CHOOSECOLS(data,s),f),
    r)
  • It didn’t let me break the resulting line.
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
c,SEQUENCE(COLUMNS(data)),
FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)),ARRAYFORMULA(CHOOSECOLS(data,filter_column)=criterion)))
</code>
<code>=LET(data,Addresses!A2:G6,filter_column,4,criterion,1, c,SEQUENCE(COLUMNS(data)), FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)),ARRAYFORMULA(CHOOSECOLS(data,filter_column)=criterion))) </code>
=LET(data,Addresses!A2:G6,filter_column,4,criterion,1,
    c,SEQUENCE(COLUMNS(data)),
    FILTER(CHOOSECOLS(data,FILTER(c,c<>filter_column)),ARRAYFORMULA(CHOOSECOLS(data,filter_column)=criterion)))

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật