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

Posted on 2007-10-03
Last Modified: 2009-12-16
Excel Spreadsheet.

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 @.@.
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")


    LVL 5

    Expert Comment

    in G1 put


    then copy it down the column.
    LVL 46

    Expert Comment

    by:Wayne Taylor (webtubbs)

    Please check other responses before posting a comment.

    LVL 5

    Assisted Solution

    if you have words in F then use:

    In G1:

    In G2 then copy down:

    Author Comment

    Thanks guys.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Suggested Solutions

    Title # Comments Views Activity
    Change and Add Hyperlinks in Excel 6 32
    Employees list 3 30
    Search Box 13 24
    Match Values and Return to Cell 6 14
    Introduction This Article is a follow-up to my Mappit! Addin Article (, it was inspired by an email posting I made to EUSPRIG (, I will briefly cover: 1) An overvie…
    Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
    This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now