+ Reply to Thread
Results 1 to 7 of 7

selecting numbers from strings and combining them

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    selecting numbers from strings and combining them

    Hello all, I have a spreadsheet in which I have 2 strings of numbers that I need to combine:
    example:
    1st cell- 12,14,16,18
    2nd cell- 3,6,7,8
    Now what i need to create is:
    12*3|14*6|16*7|18*8
    This has to be flexible because there might be more or less numbers in each string

    Thank you for your time in advance!

    Luka

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: selecting numbers from strings and combining them

    Hello there,

    If the first number is in cell A1 and the second number is in cell B1 then in C1 place

    Please Login or Register  to view this content.
    Copy this code down column C to the end of your data.

  3. #3
    Forum Contributor BenMiller's Avatar
    Join Date
    12-06-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: selecting numbers from strings and combining them

    Do you want them all to end up in the same cell?

  4. #4
    Registered User
    Join Date
    07-12-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: selecting numbers from strings and combining them

    Maybe I didn't structure my question correctly. Let me explain this again
    A1- 12,14,16,18 but might also have more numbers
    B1- 3,6,7,8 might also have more numbers
    However the quantity of numbers in a1 and b1 will always be equal
    Now in C1 i need a formula to create this
    12*3|14*6|16*7|18*8

  5. #5
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: selecting numbers from strings and combining them

    Sorry about that, personally I would use the Text To Columns Option under the Data tab to seperate the numbers. To do this Go to the Data tab and then select Text To Columns. In the Convert Text Wizard Windown select Delimited as your first option then select Next. On the next option Select Comma and deselect all other options. Then select Next. On the next Step select Finish.

    This will seperate the numbers. Then you can use the formula provided below to concatenate them.

    Does this sound like it would work?

  6. #6
    Registered User
    Join Date
    07-12-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: selecting numbers from strings and combining them

    Not really because as I said the formula has to be flexible...both a1 and b1 are numbers typed in by the user and there might be hundreds of strings like that with different lengths...

  7. #7
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: selecting numbers from strings and combining them

    Could you please provided an example worksheet. Are the users entering data into only a certain cell or are they constantly entering new information in?

    Thanks!

+ 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