My goal is to incrementally count how many times a value is used in a range.
My data:
A B
1 Yellow 1
2 Blue 1
3 Green 1
4 Blue 2
5 Blue 3
6 Green 2
7 Yellow 2
8 Green 3
9 Green 4
10 Green 5
The formula in B1 =COUNTIF($A$1:A1,A1), B2 is =COUNTIF($A$1:A2,A2) and C2 =COUNTIF($A$1:A3,A3), etc.
Column A comes from an External Data source (ODBC connection to a DBF (DB4) database) and is relfected in Excel 2010 as a Table.
Column B is an adjacent column and as such the formula will "fill down" when the external data grows beyond Row 10, i.e. 15.
The problem is that when the fill down occurs to Row 15 the RANGE in the COUNTIF formula is modifying itself to include the ENTIRE SCOPE of $A$1:A15 on ALL ROWS instead stopping at the Row it is on.
All rows get =COUNTIF($A$1:A15,A#) where # = my Row Number instead of the formulas in my original example of B1 =COUNTIF($A$1:A1,A1), B2 is =COUNTIF($A$1:A2,A2) and C2 =COUNTIF($A$1:A3,A3), etc.
I dont know if this is a bug in Excel or why this is happening.
My settings in my External Data Properties are:
Include row numbers = FALSE
Preserve column sort/filter/layout = TRUE
Adjust Colum width = TRUE
If the number of rows in the data range changes upon refresh = Overwrite existing cells with new data, clear unsed cells
I have tried all 3 options in the last setting and get the same resulting bad RANGE each time.
Help me Obi Wan Kenobi, you're my only hope!