+ Reply to Thread
Results 1 to 15 of 15

How to get a Dash"-" in string , when extract using GetMatch Function?

  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi, thsi is David (again...oh gosh )

    From 2 Cell ( Cell C-9 and Cell C-38) I'm Extracting Numbers that MATCH Using GetMatch Function
    (in reality i'm extacting match in more than 30 String)

    Cell C9 -> 04-12-28-14-30-09-25-11-27-35-05-13-02-08-18-21-26-32
    Cell C38-> 36-19-26-29-31-32-08-15-20-33-01-06-02-07-16-23-03-18



    The GetMatch Function i copy in Cell in E34,

    and in Cell E-34 Im Getting This -> 01 02 08 15 16 18 19 20 26 32 36 <- (No Dash)

    WHAT I NEED TO GET IS THE SAME RESULT BUT WITH THE DASH -> 01-02-08-15-16-18-19-20-26-32-36


    Question :
    Please where in the Formula do i have to Insert the two quote and Dash? "-"


    I'm using this Formula
    Please Login or Register  to view this content.



    Thank You !!


    Best Regards


    David

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    ................
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi Mr Jindon.

    It doesn't work, I receive Error Message #VALUE!


    NOTE:
    The Other day you have sent me this Code (i compare with Ultra edit and is exact)



    it's something that i didn't Explain on my Post (i did it on previous post, but no body answer me..)


    This is The Precedent

    Step 1
    I Paste 1 Long String in Cell C-2

    C2 -> 04-12-28-14-30-09-25-11-27-35-05-13-22-36-24-17-20-01-02-08-18-21-26-32-15-16-19-23-33-03-06-07-10-29-31-34




    Step 2

    From Pasted Long String, I Extract "zones" of 18 Numbers Using The Function LEFT, MID and RIGHT

    and Each Function i copied In Column C Starting with Row 8,9 10, 11, Etc..

    I Have another Paste in a Column I, Each Number of this String are Located in Single Cell

    So, I do the same (braking in 3 Part or 3 zones) That Vertical String, Using The Function

    Please Login or Register  to view this content.

    Step 3


    Then I Match the Cell s, For Example
    Please Login or Register  to view this content.
    ,
    Please Login or Register  to view this content.
    , Etc, etc..



    Might that's Why don't work, isn't ??

    I don't know, but something tell me that the Code or Function is coping (or getting) the Hiden Function But not the Value (numbers)


    Thank you, i appreciate your Help !!!!!


    Best Regards

    David

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    See the formula in E9.

    And you must use my attachment, not your own file.
    Last edited by jindon; 02-23-2013 at 11:38 PM.

  5. #5
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi Mr Jindon,

    Yes i'm Using your Formula, and the Attachment that I'm using is a first attachment from you, You send me a Sheet with a Code for Search and Highlight Numbers, So i start to using it, and this same sheet i copied the Concat Code.

    The Only Function that i Copied was the Left,Mid and Right.. (and the TEXT to extract the second String)
    But this one i did later..


    I'm sorry to be annoying ...


    Thank you.


    David
    Last edited by david gonzalez; 02-24-2013 at 12:02 AM. Reason: sorry, add few word

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    If you are using the file I attached in my post #2 and you got the error, I can not help you more.

    It is working without error here.

  7. #7
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi Mr Jindon,

    i know you help me a lot, and i appreciated.

    Thank you !


    Best Regards

    David

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    If you post a workbook that you got the error, I will take a look at it.

  9. #9
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Smile Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi Mr Jindon,

    Yayyy..... (Smile...)

    Thank you, Please find the File attached.



    David..
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi Mr Jindon,

    Please Note that i removed the Search Button, (trying made work) Because the Search won't work if the Numbers don't have the Dash "-"

    The Whole String get highlighted instead.


    David.

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    It is not the file I attached in this thread.

    1) Found procedure called "Search", I have written it somewhere in this forum, in Mudule2.
    I strongly suggest to change that name to something different like "MySearch" as "Search" is a vba reserved word.

    2) Change the function to
    Please Login or Register  to view this content.

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    And change "Search" sub procedure to
    Please Login or Register  to view this content.
    It will convert all the formula to a value, because partial formatting is not available to the result from formula or numbers.

  13. #13
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi Mr Jindon,

    Yes, i'm going to rename the Code, By the Way tha't is the code that you Send me on a workbook named "Sample with Code"
    and the name of the Code was "test", so i renamed..

    Thank you very Much, i think in that point is located the problem..


    Thank you again,


    Best Regards

    David

  14. #14
    Forum Contributor
    Join Date
    10-21-2012
    Location
    miami, florida usa
    MS-Off Ver
    Excel 2007
    Posts
    260

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Hi Mr Jindon,

    Yes it work Perfect except the Search, but it's Okaii, I'll read a lot and find the way to fix it.



    Thank you !


    Best Regards

    David

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: How to get a Dash"-" in string , when extract using GetMatch Function?

    Quote Originally Posted by david gonzalez View Post
    Hi Mr Jindon,

    Yes it work Perfect except the Search, but it's Okaii, I'll read a lot and find the way to fix it.
    See my last post.

+ 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