+ Reply to Thread
Results 1 to 7 of 7

How to parse comma separated values in a cell & generate command

  1. #1
    Registered User
    Join Date
    07-17-2012
    Location
    St Louis
    MS-Off Ver
    Excel 2003
    Posts
    4

    How to parse comma separated values in a cell & generate command

    Hello all,
    Column A Column B
    Column C
    10.50.14.1 1521, 1522, 1527
    telnet 10.50.14.1 1521
    telnet 10.50.14.1 1522
    telnet 10.50.14.1 1527


    My q is how to parse column B & generate column C, if there is only one value i can column B, i can use & or concantenate command, with multiple values i am lost

    Thanks in advance for any suggestions

    Babu

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: How to parse comma separated values in a cell & generate command

    How about this:

    select cell you want to work with (i.e. A19).
    In B 19 is your text with ,
    In C19 it will start to write result:

    Please Login or Register  to view this content.
    Last edited by zbor; 07-17-2012 at 04:31 PM.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: How to parse comma separated values in a cell & generate command

    You can also add shortcut so you can easily run macro.
    Click ALT+F8 and then select this macro and under Options button choose shortcut key (for example Shift+T)

    Then you can select cell in A column and run Ctrl+Shift+T

  4. #4
    Registered User
    Join Date
    07-17-2012
    Location
    St Louis
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How to parse comma separated values in a cell & generate command

    Thanks, just curious is there a formula instead of a macro.
    I have multiple rows, if run it on 2nd cell, its not appending to the end of first cell generation.
    Reg
    Babu
    Last edited by sirababu; 07-17-2012 at 06:53 PM.

  5. #5
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: How to parse comma separated values in a cell & generate command

    May be like this, C1 copy down

    ="telnet "&A$1&" "&TRIM(MID(SUBSTITUTE(","&B$1,",",REPT(" ",99)),ROWS(C$1:C1)*99,99))
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  6. #6
    Registered User
    Join Date
    07-17-2012
    Location
    St Louis
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How to parse comma separated values in a cell & generate command

    Thanks, is it possible to add all telnet commands one below another in a single cell for each row.

    Columna A Column B

    10.50.14.1 1521, 1522, 1527
    10.50.14.2 1520, 1501

    Reg
    Venkat
    Last edited by sirababu; 07-19-2012 at 01:57 PM.

  7. #7
    Registered User
    Join Date
    07-17-2012
    Location
    St Louis
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: How to parse comma separated values in a cell & generate command

    Thanks, is it possible to add all telnet commands one below another in a single cell for each row.

    Columna A Column B

    10.50.14.1 1521, 1522, 1527
    10.50.14.2 1520, 1501

    Reg
    Venkat

+ 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