+ Reply to Thread
Results 1 to 4 of 4

Variable with Concatenate...

  1. #1
    Registered User
    Join Date
    01-02-2013
    Location
    Denver, CO
    MS-Off Ver
    Excel 2010
    Posts
    11

    Variable with Concatenate...

    I have a simple task and I use the concatenate formula to resolve alot of keystrokes. I now have an issue where I have to edit that formula because of a additional character for the string won't upload into a database. Here's my example:

    1. Cell A1= 12345xxxx Cell B1= 67 Cell C1= 8

    I use =CONCATENATE(A1,"-000"&B1,"-000"&C1) and my result is displayed in D1= 12345xxxx-00067-0008

    Easy enough! Now adding the following is the problem:

    1. Cell A2= 12345 Cell B2= 67 Cell C2= 89

    I use =CONCATENATE(A2,"-000"&B2,"-000"&C2) and my result is displayed in D2= 12345xxxx-00067-00089

    Now D2 has one too many characters from C2

    I modify the formula by reducing to "-000"&C2 to be "-00"&C2 manually but now the line items have quadrupled and manually isn't going to work for this being so time consuming.

    Is there a way to use a variable with the concatenate or am I using the wrong formula period ??

    I appreciate your assistance...

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Variable with Concatenate...

    Try

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Variable with Concatenate...

    Try:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  4. #4
    Registered User
    Join Date
    01-02-2013
    Location
    Denver, CO
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Variable with Concatenate...

    Both work perfect...thanks and a Happy New Year to you !!

+ 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