Solved

# Excel Formula, counters based on another cell's contents, continuous.

Posted on 2007-10-03
1,303 Views

Column F and G.

Column F lists names of objects. A, B, C, D, etc.

Column G is a counter column for objects that begin with "A".

F1 = A
F2 = A
F3 = A
F4 = A
F5 = B
F6 = A
F7 = C
F8 = C
F9 = A

I want the G column to count but I don't know how to make the formula...
Result should be...

G1 = 1
G2 = 2
G3 = 3
G4 = 4
G5 = 4
G6 = 5
G7 = 5
G8 = 5
G9 = 6

I have no idea how to create formula @.@.
0
Question by:Eternal-Mercury

LVL 46

Accepted Solution

Hi Eternal-Mercury,

In cell G1, enter this formula, then copy down as far as needed....

=COUNTIF(F\$1:F1, "A")

Regards,

Wayne
0

LVL 5

Expert Comment

in G1 put

=COUNTIF(\$F\$1:F1,"A")

then copy it down the column.
0

LVL 46

Expert Comment

usarian,

Please check other responses before posting a comment.

Wayne
0

LVL 5

Assisted Solution

if you have words in F then use:

In G1:
=IF(LEFT(F1,1)="A",1,0)

In G2 then copy down:
=IF(LEFT(F2,1)="A",1,0)+G1
0

Author Comment

Thanks guys.
0

## Featured Post

### Suggested Solutions

Employees list 3 30
Search Box 13 24