P
Pete McCosh
All,
I would appreciate any light you can shed on the failure
of this formula to work the way I want it to:
{=INDEX($I$2:$BM$2,1,SMALL(IF($I3:$BM3=$H3,COLUMN
($I3:$BM3),100),COUNTIF($I3:$BM3,$H3)))}
The INDEX and COUNTIF parts work fine, but there seems to
be something amiss in the IF part.
H3 contains a shift code letter and I3:BM3 contain half
hourly details which can consist of the same shift code or
a range of different values. The IF statement is supposed
to create an array of values by looking at each cell in
the range and, if it equals the shift code, adding the
column index and, if not, adding 100 which is higher than
any possible positive value (column BM = 65.)
The SMALL function should then pick out the Nth
smallest value, where N is the number of occurences of the
shift code in the range...
What actually happens is it returns the column index
irrespective of the value. In fact, I've just looked into
it a bit more and it is actually evaluating all the cells
as true, even though some of them are demonstrably not
equal...
Any help appreciated.
Pete
I would appreciate any light you can shed on the failure
of this formula to work the way I want it to:
{=INDEX($I$2:$BM$2,1,SMALL(IF($I3:$BM3=$H3,COLUMN
($I3:$BM3),100),COUNTIF($I3:$BM3,$H3)))}
The INDEX and COUNTIF parts work fine, but there seems to
be something amiss in the IF part.
H3 contains a shift code letter and I3:BM3 contain half
hourly details which can consist of the same shift code or
a range of different values. The IF statement is supposed
to create an array of values by looking at each cell in
the range and, if it equals the shift code, adding the
column index and, if not, adding 100 which is higher than
any possible positive value (column BM = 65.)
The SMALL function should then pick out the Nth
smallest value, where N is the number of occurences of the
shift code in the range...
What actually happens is it returns the column index
irrespective of the value. In fact, I've just looked into
it a bit more and it is actually evaluating all the cells
as true, even though some of them are demonstrably not
equal...
Any help appreciated.
Pete