+ Reply to Thread
Results 1 to 4 of 4

Formula to find last occurence of revision number to automate

  1. #1
    Registered User
    Join Date
    02-22-2016
    Location
    Australia
    MS-Off Ver
    Professional Plus 2013
    Posts
    2

    Formula to find last occurence of revision number to automate

    Hi all,

    I've scoured the web as much as possible and I am coming up without any solution. Either I'm thinking too hard or not enough.

    Basically, for some reason, we are using Excel to manage a repository of requirements and it is somewhat nightmarish. I am trying to clean it up and make it as easy to use as I can possibly manage.

    One item I'm trying to tackle is auto-numbering the revisions of requirements. That is, if a requirement ID is in the column more than once the revision number will add 1 to the previous revision number for the same ID.

    I can easily get a count of how many times a requirement ID is in the column through COUNTIF and then everything starts to fall apart from there as I then try and get the last instance of that ID and it's revision number to add 1 to that. Using a VLOOKUP can get the revision number connected to the ID, but trying to do the last one of that is the spanner I can't fix.

    Any solutions through use of formulas? I'm trying to avoid VBA where I can.

    In summary, what I need is a formula that will:
    - If the ID value has only a count of 1 then the revision number in the correct cell will be automatically entered as 001
    -- else if the ID value has a count of >= 2 then find the last revision number for that ID and add a 1 to the number

    Thanks.
    Last edited by TiredHalo; 02-23-2016 at 05:35 PM.

  2. #2
    Forum Contributor
    Join Date
    06-30-2015
    Location
    Netherlands
    MS-Off Ver
    2013 / 2016 / 365
    Posts
    146

    Re: Formula to find last occurence of revision number to automate

    Hi,

    without too much thinking could it be something like
    requirement revision
    a 001
    b 001
    c 001
    d 001
    a 002
    f 001

    The formula i used for the revision number is : =TEXT(COUNTIF(A$2:A2,A2),"000")

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,366

    Re: Formula to find last occurence of revision number to automate

    Isn't the next revision number simply the COUNTIF(...) +1 for a given ID??

    Post a sample Excel file so we can see how the data is organised.

  4. #4
    Registered User
    Join Date
    02-22-2016
    Location
    Australia
    MS-Off Ver
    Professional Plus 2013
    Posts
    2

    Re: Formula to find last occurence of revision number to automate

    Thanks Joris. Clearly my problem was overthinking it. I use that similar formula to generate my requirement numbers (without the countif). Now I just feel silly.

+ 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] Filtering the highest revision number for a individual products
    By bob.m in forum Excel General
    Replies: 8
    Last Post: 12-16-2019, 03:28 AM
  2. VBA to compare revision number between 2 excel files - 1 open & 1 closed
    By kiki1989sb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2015, 09:39 AM
  3. Override formula with a manually entered number, but keep formula stored
    By EmmaWied in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-09-2015, 07:52 PM
  4. excel insert automatic revision number
    By andymopar in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-26-2013, 12:14 PM
  5. Replies: 1
    Last Post: 06-10-2013, 07:08 PM
  6. Replies: 2
    Last Post: 05-05-2011, 04:59 PM
  7. Revision Number in Excel?
    By JBeaucaire in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-13-2008, 02:29 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