 SOLVED

# Excel FILTER built-in function

Hi,

I tried but didn't succed to use FILTER and OFFSET functions in the same formula in order to get values located in the 2nd column of a table, only for rows matching a criteria. It looks like OFFSET isn't able to use FILTER result as its first argument. Am I right? Is there any other solution to what I want to acheive (without using VBA, as I'd like to use this formula for validation purpose)?

Thanks in advance for your replies,

Eric

6 Replies
best response confirmed by ericGuyaderBerger (Occasional Contributor)
Solution

# Re: Excel FILTER built-in function

Do you mean

=FILTER(Table[SecondColumn], criteria)

?

# Re: Excel FILTER built-in function

Thank you, this solution takes me a step further, as I can get the only values of my second column matching the criteria based on first column values.
But if it works as a cell's formula, it still doesn't work as a validation formula.

# Re: Excel FILTER built-in function

Thus formula is literally as above, use second column as first parameter and formula for criteria on first column as second parameter.

By the way, I try to play with Analyze Data on such table asking

filter 'Two' where 'One' is a1 as table

Result is with generated formula

``=IF(SUM(ISERROR(Table1)*1,MIN(SUM(1-ISNUMBER(Table1[Two])),SUM(1-ISTEXT(Table1[Two]))))>0,NA(),SORT(UNIQUE(FILTER(Table1[Two],Table1[One]="a1"))))``

Bit overcomplicated, but that's robot. We may skip error handling and take only FILTER part.

# Re: Excel FILTER built-in function

Excel doesn't allow to use array formulas for data validation. You may generate spill by FILTER, even in another sheet (and hide it if necessary), use reference on this spill in data validation # Re: Excel FILTER built-in function

Thanks again for this new reply.

Spill reference works like a charm!

# Re: Excel FILTER built-in function

@ericGuyaderBerger , you are welcome, glad it helped