Conditional filter using array formula
All of the suggested formulas do what you asked for. I favor my own for a
couple of reasons but that's beside the point.
The clarified explanation you provided makes no difference, the formulas
should work.
However, since the data to be returned is numeric we can use a slightly
simpler array formula** to get the results.
Assume G1 = P or W
Enter this array formula** in G2 and copy down until you get blanks:
=IF(ROWS(G$2:G2)<=COUNTIF(PW,G$1),SMALL(IF(PW=G$1, Record),ROWS(G$2:G2)),"")
This assumes that for every P or W there is a corresponding number.
This will return the numeric values sorted in ascending order.
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)
Make sure you enter the formula as an array. I'm wondering if that may be
what the problem is with the other formulas.
--
Biff
Microsoft Excel MVP
wrote in message
...
Guys thanks very much for the help, unfortunately I can't get any of
them to work. It may be due to two reasons:
1)My data is a sheet called Jobs, and my formula will be in a sheet
called Personal
2)In trying to create a generic example I may have inadvertently
complicated the query: Instead of Group the field is titled P/W (e1)
and the data is in range e2:e50 (range named PW), and instead of the
entries being A or B it is p or w. The other difference is that it
isn't names it is numbers and the fields are titled Record (c1) and in
range c2:c50 (range named Record).
I tried to adapt it to my data set but haven't been able to crack it.
Any chance you can help resolve this.
Cheers
Matt
|