View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max
 
Posts: n/a
Default Can I use a formula to filter data?

One play using non-array formulas ..
Assuming source data in A1 down

Put in B1:
=IF(ROW(A1)COUNT(C:C),"",INDEX(A:A,MATCH(SMALL(C: C,ROW(A1)),C:C,0)))

Put in C1:
=IF(ISNUMBER(SEARCH("Dog",A1)),ROW(),"")

Select B1:C1, fill down to last row of data in col A
Col B will return the required results, all neatly bunched at the top

Replace SEARCH with FIND in the criteria col C if you need it to be case
sensitive (SEARCH is not case sensitive)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Josh Craig" wrote:
Hi I just wanted to know if there was a formula I could use so data in column
A could be replicated in column B except without certain values from column A
which contain certain bits of text.

For example, if column A text contained the word "dog" I would want it to
show in column B but if it contained the word "cat" I wouldn't. But I don't
want blank spaces in column B next to the "cat" cells, I want the data to
move up so column B only contains "dog" cells with no spaces in between.

So the columns would be like this:

Column A Column B
Black Cat Black Dog
Brown Cat Black Dog
Black Dog Brown Dog
Yellow Cat
Black Dog
Brown Dog


Is this possible? Thanks in advance for your help!