+ Reply to Thread
Results 1 to 7 of 7

Combine date with another number in another cell?

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    stockton,ca
    MS-Off Ver
    Excel 2010
    Posts
    3

    Combine date with another number in another cell?

    I wanted to know how, or if there is a formula to combine the date with a serial number (I have to inventory a lot of computers) to make an asset control number?
    for example:
    1/12/2012 607314099

    to make 011212099

    So I would be taking the date and adding the last 3 digits of the serial number to make the an asset control number. keep in mind that the date and serial number are in two different cells and I want the new number to be in the cell next to the serial number.

    Can someone help me do this?

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Combine date with another number in another cell?

    with Date in A1 and Serial Number in A2
    =Text(A1,"mmddyy")&RIGHT(A2,3)
    Is that what you need?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Combine date with another number in another cell?

    If the date is in A1 and the serial is in B1 then in C1:

    =TEXT(DAY(A1),"0#")&TEXT(MONTH(A1),"0#")&YEAR(A1)&" "&RIGHT(B1,3)
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  4. #4
    Registered User
    Join Date
    06-19-2012
    Location
    stockton,ca
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Combine date with another number in another cell?

    Quote Originally Posted by ChemistB View Post
    with Date in A1 and Serial Number in A2
    =Text(A1,"mmddyy")&RIGHT(A2,3)
    Is that what you need?
    This is exactly how I wanted it! now is there a way to automatically apply this formula to the whole column?

  5. #5
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Combine date with another number in another cell?

    Assuming now that Date is in col A, S# in Col B and formula in col C.
    =Text(A1,"mmddyy")&RIGHT(B1,3) can be dragged or copied right down the column
    Is that how you're set up?

    Thank you for the rep.

  6. #6
    Registered User
    Join Date
    06-19-2012
    Location
    stockton,ca
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Combine date with another number in another cell?

    yeah thats how I have it setup. I know you can drag it down but is there a way so It automatically generates that number without having to drag it down?

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Combine date with another number in another cell?

    No, the formula needs to be in each cell. There are a number of ways to put the formula into each cell.
    With the formula in C1
    1. Double clicking on the "Fill Handle" will automatically copy the formula down to the end of your table.
    2. In the Name box (where you usually see the Cell address (i.e. C1), Double click and enter C1:C1000. Then hit enter to select that range. Then CNTRL + D to copy the formula down.
    3. Copy cell C1, select rest of range and paste.

+ 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