+ Reply to Thread
Results 1 to 2 of 2

Increment counter based on cell criteria

  1. #1
    Registered User
    Join Date
    07-29-2016
    Location
    USA
    MS-Off Ver
    2010
    Posts
    2

    Increment counter based on cell criteria

    my problem:

    column A contains a unique ID # for a well, in other columns are events for that well. Multiple events occur for each well (multiple rows with same unique ID #)

    now I need to put into column B, a sequential number counting each event for each well.

    I know I did not describe this well so let me try to show
    A B
    170570122000 1
    170570122100 1
    170570122100 2
    170570125400 1
    170570125400 2
    170570125400 3
    170570128400 1
    170570128400 2


    how to auto-generate column B?

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Increment counter based on cell criteria

    Try this...

    Data Range
    A
    B
    1
    Well
    Count
    2
    170570122000
    1
    3
    170570122100
    1
    4
    170570122100
    2
    5
    170570125400
    1
    6
    170570125400
    2
    7
    170570125400
    3
    8
    170570128400
    1
    9
    170570128400
    2


    This formula entered in B2 and copied down:

    =COUNTIF(A$2:A2,A2)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Help with increment counter between date range
    By Rick_Hawk in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-13-2014, 03:09 PM
  2. Possible feature - increment counter based on string pattern ?
    By davidku in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2014, 04:08 PM
  3. Increment a counter by 1 for every 4 cells the same.
    By sravilob in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-05-2013, 09:22 AM
  4. Counter that identifies based on specific criteria help!
    By talsayon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-11-2013, 06:56 PM
  5. Adding a Counter based on Criteria
    By EvilSean in forum Excel General
    Replies: 2
    Last Post: 02-15-2012, 11:34 AM
  6. Macro to increment a counter
    By tleee in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-16-2012, 07:53 PM
  7. Count data to a limit and increment counter
    By Ricker090 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2012, 09:46 AM
  8. [SOLVED] Increment a counter in Excel
    By COSdl in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2005, 11:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1