HWL
Active Member
- Joined
- Dec 1, 2009
- Messages
- 462
I have an array that is returning the row number of a matched criteria but I need to be able to return the row number of multiple criteria.
Here is the code:
=IF(ROWS(C$2:C2)<=SUM(COUNTIF(A$2:A$21,{"x","d","a","n"})),SMALL(IF(A$2:A$21="a",ROW(A$2:A$21)-ROW(A$2)+2),ROWS(C$2:C2)),"") use CTRL+SHFT+ENTER
As you can see, the data is entered into column A. This array is dragged down column C. Right now it only returns if the data in column A is an "a".
I want it to return the row numbers of "x", "d", & also "n".
I tried an OR statement after the SMALL, like this:
SMALL(IF(or(A$2:A$21="a",A$2:A$21="x",A$2:A$21="d",A$2:A$21="n"),ROW(A$2:A$21)-ROW(A$2)+2),ROWS(C$2:C2))
But this does not work. Any ideas would be great! Thanks
Here is the code:
=IF(ROWS(C$2:C2)<=SUM(COUNTIF(A$2:A$21,{"x","d","a","n"})),SMALL(IF(A$2:A$21="a",ROW(A$2:A$21)-ROW(A$2)+2),ROWS(C$2:C2)),"") use CTRL+SHFT+ENTER
As you can see, the data is entered into column A. This array is dragged down column C. Right now it only returns if the data in column A is an "a".
I want it to return the row numbers of "x", "d", & also "n".
I tried an OR statement after the SMALL, like this:
SMALL(IF(or(A$2:A$21="a",A$2:A$21="x",A$2:A$21="d",A$2:A$21="n"),ROW(A$2:A$21)-ROW(A$2)+2),ROWS(C$2:C2))
But this does not work. Any ideas would be great! Thanks