+ Reply to Thread
Results 1 to 3 of 3

Tried to add a "-" simple when adding a digit to a series

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Tried to add a "-" simple when adding a digit to a series

    Hi everyone,

    I have the following code which adds a consecutive digit to a repeating cell value in:

    =a2&countif($A$2:A2,A2)

    So, this formula has put in cell B2. This means, that if if A2:A5=1 for each row, then B2=11, B3=12, B4=13, etc.

    What I'm trying to do is put "-" between the original value and the extra digit. So, B2 would instead look like 1-1, B3=1-2, B4=1-3, etc.

    Any ideas how I can do this?

    Thanks!!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Tried to add a "-" simple when adding a digit to a series

    hi Groovicles. maybe:
    =A2&"-"&COUNTIF($A$2:A2,A2)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: Tried to add a "-" simple when adding a digit to a series

    Ben. You, sir, are a genius. Thanks!

+ 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. Adding multiple "find" with "left" /"Right"
    By Daniel1 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-22-2014, 04:33 PM
  2. List Data Validation + option of "INC"+12 digit number"
    By penfolda in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-29-2013, 02:53 AM
  3. Replies: 1
    Last Post: 03-08-2013, 05:20 AM
  4. Simple - Adding "=" to a cell with exsisting values
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2011, 09:03 AM
  5. When I type "0" in front of a series of numbers the "0" disappears
    By aaponte in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 05-18-2007, 02:00 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