Formula for Filter

M

manjukhan

I need to filter a column for non blanks and list the values on a
different column. I can do this by doing a autofilter and filter for
non blanks . But I want to do it automatically with a formula. Do any
one have a formula accomplish this.

Thanks
Mansoor A Khan
 
D

Domenic

Assuming that Column A contains your data, the first row contains your
header/label, and the values are text, try...

B2, copied down:

=IF(ROWS($B$2:B2)<=COUNTIF($A$2:$A$100,"?*"),INDEX($A$2:$A$100,SMALL(IF($A$2:$A$100<>"",ROW($A$2:$A$100)-ROW($A$2)+1),ROWS($B$2:B2))),"")

...confirmed with CONTROL+SHIFT+ENTER, not just ENTER. If the values
are numerical, change...

COUNTIF($A$2:$A$100,"?*")

...to...


COUNTIF($A$2:$A$100,"<0")+COUNTIF($A$2:$A$100,">=0")

Hope this helps!
 
M

manjukhan

Dominic,
Thank you very much . The formula is working fine. I will get back t
you if I have any problems.
Appreciate your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top