G
Guest
Anyone seen this before, and if so, is it a bug?
using a simple countif, entries in Column A are:A
Data
a
a
a
b
b
b
b
(So, a heading of Data followed by 3 a's and 4 b's)
on the same worksheet i put
B ¦C
Criteria¦Count
a ¦=countif(A:A, B2)
b ¦=countif(A:A,B3)
which shows
a 3
b 4 as expected.
Now do a descending sort on columns b and c by column c (on the countif) and
you get
b 4
a 3 as expected.
However, if the criteria and countif columns are on a separate worksheet,
doing the sort gives this results
b 3
a 4
which is wrong!
the reason being that the Countif formula that was originally looking at
cell a2 is still looking at a2 after the sort, it no longer simply looks "one
cell the left"
Is it expected behavour in Excel that the formula adjustments made when
sorting are different depending on the location of the target cells?
Thanks!
using a simple countif, entries in Column A are:A
Data
a
a
a
b
b
b
b
(So, a heading of Data followed by 3 a's and 4 b's)
on the same worksheet i put
B ¦C
Criteria¦Count
a ¦=countif(A:A, B2)
b ¦=countif(A:A,B3)
which shows
a 3
b 4 as expected.
Now do a descending sort on columns b and c by column c (on the countif) and
you get
b 4
a 3 as expected.
However, if the criteria and countif columns are on a separate worksheet,
doing the sort gives this results
b 3
a 4
which is wrong!
the reason being that the Countif formula that was originally looking at
cell a2 is still looking at a2 after the sort, it no longer simply looks "one
cell the left"
Is it expected behavour in Excel that the formula adjustments made when
sorting are different depending on the location of the target cells?
Thanks!