+ Reply to Thread
Results 1 to 7 of 7

Increment the value of an alphanumeric field by one if that combination already exists

  1. #1
    Registered User
    Join Date
    03-04-2015
    Location
    Geneva
    MS-Off Ver
    8
    Posts
    3

    Increment the value of an alphanumeric field by one if that combination already exists

    Hello,

    I am trying to work out a formula that returns an alphanumeric field incremented by one if that same combination of text and number exists in a previous cell.

    In the attached file, I have to modify the formula in column B but do not know how.

    Currently cells in column B return per each row a result based on content of the cell in column A. If A2 is the first cell in column A to contain "Risk", B2 will contain "R"&1="R1". However if I have another cell after A2 that contains "Risk" again, I would like the corresponding cell in column B to contain "R2" or "R[n+1]" if "Risk" already appears n times in previous cells of the same column B.

    Same for other possible values of column A. As another example, if A25 is the first cell to contain "Dependency", B25 will contain "D"&1="D1". However if I have another cell after A25 that contains "Dependency" again, I would like the corresponding cell in column B to contain "D2" or "D[n+1]" if "Dependency" already appears n times in previous cells of the same column B.

    RAID Log2.xlsx

  2. #2
    Registered User
    Join Date
    01-28-2014
    Location
    Brno
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Increment the value of an alphanumeric field by one if that combination already exists

    Hi,

    Check formula in attached spreadsheet.
    Attached Files Attached Files

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Increment the value of an alphanumeric field by one if that combination already exists

    Build a lookup table for converting the words to codes, in say Q2:R6
    Q2:Q6 = Risk, Assumtion, Issue etc.
    R2:R6 = R, A, I etc..

    Then use
    =VLOOKUP(A2,$Q$2:$R$6,2,FALSE)&COUNTIF(A$2:A2,A2)

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Increment the value of an alphanumeric field by one if that combination already exists

    Sorry for the dup..
    Last edited by Jonmo1; 03-04-2015 at 09:18 AM. Reason: duplicate.

  5. #5
    Registered User
    Join Date
    03-04-2015
    Location
    Geneva
    MS-Off Ver
    8
    Posts
    3

    Wink Re: Increment the value of an alphanumeric field by one if that combination already exists

    Thank you so much pepe74287, works wonderfully!

  6. #6
    Registered User
    Join Date
    03-04-2015
    Location
    Geneva
    MS-Off Ver
    8
    Posts
    3

    Re: Increment the value of an alphanumeric field by one if that combination already exists

    Thank you anyways for your reply Jonmo1!

  7. #7
    Registered User
    Join Date
    11-30-2016
    Location
    Dubai
    MS-Off Ver
    2010
    Posts
    3

    Talking Re: Increment the value of an alphanumeric field by one if that combination already exists

    Thanks a Ton pepe74287! Worked like a charm

+ 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. Increment Alphanumeric Value of a Cell on each print job
    By rudygortiz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2014, 03:55 PM
  2. Formula checking if a combination of cells exists in the range
    By chrismyers51 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2013, 05:49 PM
  3. [SOLVED] Add Leading Spaces to Alphanumeric field
    By sweetkel23 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2012, 12:48 AM
  4. Replies: 1
    Last Post: 03-30-2012, 08:17 AM
  5. Replicate and increment alphanumeric keywords?
    By toolsavvy in forum Excel General
    Replies: 7
    Last Post: 12-16-2007, 03:02 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