Mitesh Bisani
Mitesh Bisani

Reputation: 1

How do I Solve this Error in Filter function

When I try to use the code in Google Sheets

=Filter(NKBPurchase!N2:N, isNumber(Search(D2, NKBPurchase!N2:N)), "Not Found")

I am getting an error stating the undermentioned

FILTER has mismatched range sizes. Expected row count: 947. column count: 1. Actual row count: 1, column count: 1.

Please suggest how to solve this issue.

Upvotes: 0

Views: 169

Answers (2)

Andres Duarte
Andres Duarte

Reputation: 3350

According to the Filter function documentation:

condition arguments must have exactly the same length as range.

Your first condition "isNumber(Search(D2, NKBPurchase!N2:N))" is ok because it has the same length as the range (first argument). But your second condition is just one single value hence not having the same length as the range, you could just delete this second condition and the function will work.

Upvotes: 1

Gary's Student
Gary's Student

Reputation: 96791

You need to closeout the ranges. Replace

N2:N

with:

N2:N9999

or another appropriate value.

Upvotes: 0

Related Questions