+ Reply to Thread
Results 1 to 14 of 14

Lookup (or IF) the next unique number based on a value of Y or N in another cell

Hybrid View

  1. #1
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,053

    Re: Lookup (or IF) the next unique number based on a value of Y or N in another cell

    i dont see a workbook from you to relate to, so assume your numbering is in column A, you would enter the 1st "seed" in A2 (assuming A1 has a heading), then copy that formula down. to make sure it only appears when something is entered in that row, you can tie it to column B (or any column that will have info in it), by wrapping it in an if statement...

    =if(B2="","","="this is row "&MID(A1,13,2)*1+1) obviously you will need to change the "this is row " part, and also the ,13, i will explain that below

    what ="this is row "&MID(A1,13,2)*1+1 does is as follows...
    1st it strips out the text by getting the MIDdle string from A1 (the cell above), starting at character 13 (this is row =12 characters, +1 for the space), and returning the next 2 characters (change that to 3 if you will have more than 99 numbers)
    then it takes the above - which is text, although it looks like a number - and multiplies it by 1 to convert the text number to a real number, and adds 1 to it
    finally it concatenates (joins) the text with the increased number

    hope that makes sense, if not shout
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  2. #2
    Registered User
    Join Date
    11-08-2012
    Location
    Issaquah, WA
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Lookup (or IF) the next unique number based on a value of Y or N in another cell

    I'd be happy to attach a workbook with my data, but I don't think my access allows me to.

    I'll check in the morning when i get back to work...

+ 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