[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1304
  • Last Modified:

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

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 @.@.
0
Eternal-Mercury
Asked:
Eternal-Mercury
  • 2
  • 2
2 Solutions
 
Wayne Taylor (webtubbs)Commented:
Hi Eternal-Mercury,

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

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

Regards,

Wayne
0
 
usarianCommented:
in G1 put

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

then copy it down the column.
0
 
Wayne Taylor (webtubbs)Commented:
usarian,

Please check other responses before posting a comment.

Wayne
0
 
usarianCommented:
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
 
Eternal-MercuryAuthor Commented:
Thanks guys.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now