+ Reply to Thread
Results 1 to 5 of 5

excel 2007 - how do i generate a sequential number within an IF formula?

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Burlington, VT
    MS-Off Ver
    Excel 2007
    Posts
    2

    excel 2007 - how do i generate a sequential number within an IF formula?

    Column A, B and C are values which describe a product. I want column D to generate a sequential number based on the contents of a given cell in column A. Together the four values make up the product code.

    Column A: Location

    Column B: Species

    Column C: Date

    Column D: Reference Number

    There are multiple locations which will fill the cells in column A. I want the reference number sequence to begin with 1 for each location. My approach is to use a nested IF formula to isolate the locations, but I can't figure out how to generate a unique sequential reference number. Any thoughts?

    -Tom

    Burlington, VT

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: excel 2007 - how do i generate a sequential number within an IF formula?

    Hi Tom,

    Use a combination of concatenations and Vlookups for the Location...

    Please show an example to make sure, I'm going the right path...

    Thanks,
    Dennis

  3. #3
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: excel 2007 - how do i generate a sequential number within an IF formula?

    Hello Tom, welcome to the forum.

    Assuming data starting from A2 to down. In D2 use

    =IF(A2="","",COUNTIF(A$2:A2,A2))

    Then drag down as needed.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  4. #4
    Registered User
    Join Date
    10-15-2012
    Location
    Burlington, VT
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: excel 2007 - how do i generate a sequential number within an IF formula?

    That works great! Thank you so much.

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: excel 2007 - how do i generate a sequential number within an IF formula?

    @ tom BTV

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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