+ Reply to Thread
Results 1 to 7 of 7

Incremental count

  1. #1
    Registered User
    Join Date
    01-13-2015
    Location
    Southampton, England
    MS-Off Ver
    2007
    Posts
    6

    Incremental count

    Hello All
    I have a column of numbers in numerical order and what I need is a way to generate an incremental count when there are multiple occurances of the same number.
    Please see attached file. Column A is my data and column B is what I require.
    Can it be done with formulas?
    Many thanks.
    Adrian.
    Count.xlsx

  2. #2
    Registered User
    Join Date
    11-10-2011
    Location
    JK Kohat
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Incremental count

    Dear,

    file could not be attached.

    Kindly do as follow:

    Type 1 in the first cell
    below that cell type the formula =IF(A2=A1,C1+1,1)

    Regards,


    Imran.
    Attached Files Attached Files

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Incremental count

    use this in B1:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Never use Merged Cells in Excel

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Incremental count

    Hello
    First put 1 in B1 and in B2 put the following formula

    =IF(A2=A1,B1+1,1)
    Now copy it below
    Tell me if it works right….

    Hope it helps

    If you are satisfied then just click on ADD REPUTATION below to say thanks.....

    Regards
    Sourabh Gupta

  5. #5
    Registered User
    Join Date
    01-13-2015
    Location
    Southampton, England
    MS-Off Ver
    2007
    Posts
    6

    Re: Incremental count

    Hello All
    Great answers, I feel a bit stupid now I see how it's done.
    Many thanks.
    Adrian.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Incremental count

    There is a difference between those two solutions in case of non-contiguous data when previous number (for example 2 on the picture below) appear latter.
    In that case mine approuch would keep counting 2's while other solutions will start counting all over again.

    It's not that some solution is wrong - it's just what you expect in those situation.

    count.jpg

  7. #7
    Registered User
    Join Date
    01-13-2015
    Location
    Southampton, England
    MS-Off Ver
    2007
    Posts
    6

    Re: Incremental count

    Thanks Zbor
    My data is always in incremental order so not a problem. Interesting to see different solutions though.

+ 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. [SOLVED] Incremental count across 2 columns while considering a 3rd column
    By mikehorne23 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2014, 05:13 PM
  2. [SOLVED] incremental Count Page count
    By mohan.r1980 in forum Excel General
    Replies: 3
    Last Post: 05-16-2012, 03:58 AM
  3. Incremental count based on quantity
    By mondo21 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2012, 09:21 AM
  4. [SOLVED] Incremental comparison
    By Colin Hayes in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  5. Incremental comparison
    By Colin Hayes in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-11-2005, 06:57 PM

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