+ Reply to Thread
Results 1 to 7 of 7

how to seperate comments inside the paranthesis?

  1. #1
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    how to seperate comments inside the paranthesis?

    i have a worksheet with imported data. it is a chess game notation with comments. is it possible to separate the comments from the moves? the comment part comes in parenthesis. whatever comes in paranthesis has to be separated to the next column.
    I have given an attachment in which on sheet 1 , is the raw data. on sheet2 i have shown the result.the sheet has to be so edited that it should look nice.since i have separated the comments manually it does'nt look nice.I have separated the comments from the first table of contents only.thanks

    btw, i would like to ask you one thing.

    i usually don't use the buttons. instead i go for searching the code in the macro dialog. did this time also. but i could not find it there in the list of codes. i even changed the word"private" to option explicit with no positive result. what should i really do to run the macro? i always want that macro is named in the dialog when i click on othe macro-code groups.thanks
    Attached Files Attached Files
    Last edited by sumesh56; 04-24-2014 at 02:05 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: how to seperate comments inside the paranthesis?

    Hi..

    This is maybe something like what you're after..

    Regex patterns are definitely not my strong point.. so a better solution will probably be available.

    But.. with 15 views of your attached sample and no help yet.. this is better than nothing..

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by apo; 04-23-2014 at 09:57 PM.

  3. #3
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: how to seperate comments inside the paranthesis?

    Quote Originally Posted by apo View Post
    Hi..

    This is maybe something like what you're after
    thanks for the response. the macro "copies" the comments and "paste" to the next col. i want that the comments are "cut" to other areas. after removing the comments i should get the moves only in col B. kindly refer to the second sheet in my attachment where i have shown the result.

    if it is possible kindly edit the macro so that
    the comments are removed from the original table of contents and added at the bottom of the table
    . for example, the first game comes in B4:B33. please remove the comments in it and put under the moves in col B itself with a gap of one blank row. when the macro works i will get the moves first at the top and the comments underneath. thanks

  4. #4
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: how to seperate comments inside the paranthesis?

    Try the attached.. that's about as good as I can get it given my current time restraints and then also factoring my lack of skill in this particular field..
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: how to seperate comments inside the paranthesis?

    thanks a lot for the fruitful effort. you have proved that you are an expert in this area also. the code works as intended.

    Please advice me in the following point.

    there is a button in the sheet pressing on it will acitvate the code. how can i avoid the button? please instruct me how to see the name of the code when i press the macro dialog.

    I open the sheet. click on develper tab. click on macro. the macro should be listed there along with others if any. but in this case i couldnot see it. cls and bas are they two different things? what differentiate them?

  6. #6
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: how to seperate comments inside the paranthesis?

    Put the code that is within the CommmandButton1 into a separate Sub and place it in a Module.

    Like:

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    02-28-2012
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    542

    Re: how to seperate comments inside the paranthesis?

    thanks Apo for the direction. i did this and it works in that way.

    But please see the attached file. there are two sheets. sheet 2 is the old one in which the code works nicely. but on sheet1 it is not working gives( runtime error 13 type mismatch). what may be the reason? can you explain?. is it possible to edit the macro so that it can handle both the sheets?
    Attached Files Attached Files
    Last edited by sumesh56; 04-26-2014 at 08:01 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. removing paranthesis from text in a cell
    By pani_hcu in forum Excel General
    Replies: 5
    Last Post: 06-30-2010, 08:22 AM
  2. [SOLVED] comments inside the chart
    By hussain Al-omran in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-22-2006, 01:30 PM
  3. help on formula/paranthesis
    By wab_77 in forum Excel General
    Replies: 4
    Last Post: 04-28-2006, 02:10 PM
  4. Programming Comments from the inside!! Asistance Please
    By tristandelsur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-04-2005, 11:29 AM
  5. [SOLVED] How do I automatically show all comments on a seperate worksheet?
    By newmember in forum Excel General
    Replies: 1
    Last Post: 08-24-2005, 08:05 PM

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