+ Reply to Thread
Results 1 to 6 of 6

Add number to end of text and increase number per instance

  1. #1
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Add number to end of text and increase number per instance

    Hi All,

    Im trying to write a formula and in need of assistance!

    Essentially I have a row of names in column A. What Im after is a formula (or macro) that says:-

    If A1 = "Bob" then "Bob 1"
    If "Bob 1" already exists then "Bob 2"

    And so on......

    Any help is always appreciated!

    Thanks
    Alex

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Add number to end of text and increase number per instance

    If your names are starting from Cell A1, put this in cell B1.

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

    Adjust ranges as required..
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Add number to end of text and increase number per instance

    Thats great thanks!

    Is it possible to do this with a countifs so I can focus on one name?

    Thanks again!

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Add number to end of text and increase number per instance

    Can you give me an example of how you want the text to look like?

  5. #5
    Registered User
    Join Date
    02-01-2012
    Location
    Manchester, UK
    MS-Off Ver
    Excel 2010
    Posts
    97

    Re: Add number to end of text and increase number per instance

    Thanks NFE,

    I think I have solve it like this.......

    =IF(ISNUMBER(SEARCH("bob",A3)),(A3&" "&COUNTIF($A3:$A$3,A3)),"")

    Thanks for all your help
    Alex

  6. #6
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,879

    Re: Add number to end of text and increase number per instance

    But will this not only work for bob?

    Anyways, if you have you answer, you can mark the thread as solved

+ 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. Replies: 2
    Last Post: 04-23-2015, 04:36 PM
  2. [SOLVED] Increase number in text format for each row
    By britzer in forum Excel General
    Replies: 3
    Last Post: 12-17-2013, 12:55 PM
  3. Replies: 3
    Last Post: 09-18-2012, 01:01 AM
  4. Find the First Instance of a Number
    By Phillycheese5 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-18-2008, 10:59 AM
  5. [SOLVED] Can I increase a number by 5.5% and then round that number to the.
    By Jeff Thornburg in forum Excel General
    Replies: 1
    Last Post: 06-28-2006, 12:26 PM

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