I am counting all cells in a range that are less than another cell.
I am using the formula (COUNTIF($V$28:$V$39,"<"&V28), which works just fine and copies down nicely to subsequent rows as only the second V28 is updated thru each copy.
The problem is I want to exclude from the count any cell in the fixed range if a different cell (same row) has a certain value, let's say "AB".
i.e. if cell C28="AB", I want the formula to read (COUNTIF($V$29:$V$39,"<"&V29).
It gets worse because, if cell C30="AB" (multiple cells could), I want the formula to include V28 & V29, skip V30, and continue from V31 thru V39.
I'm thinking as I write this that I need to use a long summation of IFs, i.e.
IF($C28<>"AB",COUNTIF($V28,"<"&V28,)) + IF($C28<>"AB",COUNTIF($V29,"<"&V28)) .... etc. Exact syntax TBD and use/nonuse of $ also TBD. Could probably combine all the $C28<>"AB" somehow.
Ugly, but it might work and copy down the 11 rows correctly, just incrementing the non-$ cells.
I am using the formula (COUNTIF($V$28:$V$39,"<"&V28), which works just fine and copies down nicely to subsequent rows as only the second V28 is updated thru each copy.
The problem is I want to exclude from the count any cell in the fixed range if a different cell (same row) has a certain value, let's say "AB".
i.e. if cell C28="AB", I want the formula to read (COUNTIF($V$29:$V$39,"<"&V29).
It gets worse because, if cell C30="AB" (multiple cells could), I want the formula to include V28 & V29, skip V30, and continue from V31 thru V39.
I'm thinking as I write this that I need to use a long summation of IFs, i.e.
IF($C28<>"AB",COUNTIF($V28,"<"&V28,)) + IF($C28<>"AB",COUNTIF($V29,"<"&V28)) .... etc. Exact syntax TBD and use/nonuse of $ also TBD. Could probably combine all the $C28<>"AB" somehow.
Ugly, but it might work and copy down the 11 rows correctly, just incrementing the non-$ cells.