+ Reply to Thread
Results 1 to 10 of 10

Increment cells with the same letters

  1. #1
    Registered User
    Join Date
    01-26-2020
    Location
    US
    MS-Off Ver
    Excel , 2013
    Posts
    3

    Increment cells with the same letters

    Hi,

    I have been trying to increment cells with the same letter combination with no success. I have different letter initials and I want to make sure that cells with the same letters have sequential numbers and that if a cell has a different letter combination it starts with 1 and then increments cells with the same combination. Any ideas?

    Here is an example of what I am trying to do:

    OH-1
    FN-1
    OH-2
    CK-1
    FN-2
    CK-2
    CK-3

    Thank you!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Increment cells with the same letters

    With A1:A7 containing this list:
    Please Login or Register  to view this content.
    These regular formulas, copied down, created incremented references:
    Please Login or Register  to view this content.
    They return these results:
    With A1A7 containing this list:
    Please Login or Register  to view this content.
    These regular formulas, copied down, created incremented references:
    Please Login or Register  to view this content.
    They return these results:
    Please Login or Register  to view this content.
    or these:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

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

    Re: Increment cells with the same letters

    Assume your letters are in column A, starting in A2, you can use this formula in B2:

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

    Copy this down as far as you need to.

    Hope this helps.

    Pete

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Increment cells with the same letters

    First of all, re your profile: Google Excel is not a thing. This forum is about Excel. If you have Google Sheets and don't have Excel, then please use a forum for Google Sheets. There is quite a difference between these. If you do use Excel, please edit your profile and specify the version.

    About your question: do you already have existing cells with initials and you want to change these existing cells? A formula cannot change existing cells. You can have a helper column with a formula.

    =A1&"-"&COUNTIF(A1:$A$1,A1)

    2020-01-27_11-19-21.png

  5. #5
    Registered User
    Join Date
    01-26-2020
    Location
    US
    MS-Off Ver
    Excel , 2013
    Posts
    3

    Re: Increment cells with the same letters

    Thank you. I will update my profile.

    This formula is not working since I want to generate sequential numbers in existing cells. The initials are department abbreviations that I used the "vlookup" formula to generate. So I need to add sequential numbers for orders from the same department in the same cell so I have a unique identifier for each order.

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Increment cells with the same letters

    Put the formula into a temporary column. Copy the results. Use Paste Special > Values to paste the new text over the original text. Remove the temporary column.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,321

    Re: Increment cells with the same letters

    The user profile still hasn't been updated - please do this ASAP. As Teylyn has said, there is no such thing as Google Excel.

    Is this query for Google Sheets or Excel?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  8. #8
    Registered User
    Join Date
    01-26-2020
    Location
    US
    MS-Off Ver
    Excel , 2013
    Posts
    3
    I already stated, Excel. Why make such a big deal out of this? It’s a profile for God’s sake.

  9. #9
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,640

    Re: Increment cells with the same letters

    Because members tailor answers based on your Excel version.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,321

    Re: Increment cells with the same letters

    Quote Originally Posted by mcosta View Post
    I already stated, Excel. Why make such a big deal out of this? It’s a profile for God’s sake.
    Less of the attitude, please. We expect good manners at all time from all members, new or old.

    I am afraid I don't see where you specified that this is for Excel, but thanks for clarifying.

    As Pepe said, the profile is important so that members know which version to tailor their answer to - answers can be very different as a result.

    If you are asked a question or for clarification, there is a reason for it.

+ 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. Macro needed to increment numbers but keeping the same letters.
    By gingelp in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-21-2020, 01:18 PM
  2. VBA Macro to increment letters in the word
    By shivspatil in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-25-2018, 01:51 PM
  3. Copy worksheet and increment select cell letters by 1
    By Aciidsneaker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2014, 05:38 AM
  4. [SOLVED] Increment Letters
    By nov0798 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-11-2013, 05:19 AM
  5. [SOLVED] Quick problem - string mix of letters & numbers - increment by one
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 06-25-2013, 02:15 PM
  6. Keep row the same, increment columns letters
    By evilgrinners in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-09-2012, 12:43 PM
  7. Increment with letters in front
    By janschepens in forum Excel General
    Replies: 5
    Last Post: 08-28-2011, 09:54 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