SOLVED

Excel FILTER built-in function

Copper Contributor

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 (Copper Contributor)
Solution

@ericGuyaderBerger 

Do you mean

=FILTER(Table[SecondColumn], criteria)

?

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.

@ericGuyaderBerger 

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

image.png

asking

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

Result is

image.png

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.

@ericGuyaderBerger 

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

image.png

@Sergei Baklan 

 

Thanks again for this new reply.

 

Spill reference works like a charm!  

@ericGuyaderBerger , you are welcome, glad it helped

1 best response

Accepted Solutions
best response confirmed by ericGuyaderBerger (Copper Contributor)
Solution

@ericGuyaderBerger 

Do you mean

=FILTER(Table[SecondColumn], criteria)

?

View solution in original post