+ Reply to Thread
Results 1 to 2 of 2

Need to count the same data and assign a sequence number

  1. #1
    Forum Contributor
    Join Date
    05-29-2012
    Location
    Walnut, Ca
    MS-Off Ver
    Excel 2010
    Posts
    182

    Need to count the same data and assign a sequence number

    I have a spreadsheet (AG Orders) and Im trying to create a formula that counts how many times "DEP" is entered in column C. and then assigns that # in column K for that row. The problem that I am running into is, if I sort the spreadsheet, column K's # changes.

    Currently the formula I am using is =IF($C133="DEP",COUNTIF($Y$2:$Y133,$Y133),"") which works initially as long as I never sort the spreadsheet. Once I spreadsheet, the numbers change depending on where they are on the sheet.

    15-16 budget-AG.xlsm

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,426

    Re: Need to count the same data and assign a sequence number

    After you copy the formula down, you can then fix the values before you sort, so then they won't change.

    Hope this helps.

    Pete

+ 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] Count number of cells in sequence
    By cocacrave in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-28-2015, 08:20 PM
  2. How do i count the number of times a sequence appears in a row of data
    By dony85 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2014, 01:57 PM
  3. Help with excel 2013 vba code to Count and assign a number.
    By Red1976 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2014, 03:27 PM
  4. Replies: 2
    Last Post: 10-11-2012, 02:54 PM
  5. [SOLVED] If cell is not blank, assign next number in sequence
    By dylaughin in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2012, 03:57 PM
  6. Replies: 5
    Last Post: 11-22-2010, 06:31 PM
  7. count and display the next number in a sequence
    By chuck515 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-31-2008, 12:04 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