+ Reply to Thread
Results 1 to 5 of 5

Concatenating a unique # with same dates

  1. #1
    Registered User
    Join Date
    03-15-2012
    Location
    Canada
    MS-Off Ver
    Excel 2011
    Posts
    2

    Concatenating a unique # with same dates

    I have a problem with a function that I'm trying to do to concatenate a date and a number that is unique. I have a date row (row 3) that when populated I want to create an order # based on that date and the # of orders that day. It should look like this "40977-1"
    Here is the calculation that I have inputted in the order # feild.
    =IF(ISBLANK(B3),"",(B3&"-"&COUNTIF(B:B,B3)))
    The problem is that this returns only the total # of orders on that day and I want it to count up and number each order after the dash as they are posted. Thanks.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Concatenating a unique # with same dates

    Hi

    You have to combine the Text function with date, or else you receive the date, as a number.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  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,426

    Re: Concatenating a unique # with same dates

    Try it like this:

    =IF(B3="","",(B3&"-"&COUNTIF(B$3:B3,B3)))

    As you copy this down the countif range increases on each row.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    03-15-2012
    Location
    Canada
    MS-Off Ver
    Excel 2011
    Posts
    2

    Re: Concatenating a unique # with same dates

    That worked perfectly. Thanks for the help Pete.

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

    Re: Concatenating a unique # with same dates

    You're welcome - glad to be of help.

    Please mark the thread as Solved (check the FAQs to find out how), and you can pass on thanks directly by clicking on the "star" icon in the bottom left corner of any post that has helped you.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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