+ Reply to Thread
Results 1 to 9 of 9

How to filter/copy/paste text between special characters?

  1. #1
    Registered User
    Join Date
    03-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question How to filter/copy/paste text between special characters?

    Hi guys, please help

    Excel 2010

    I would like to copy from cells (column G) for e.g:
    <p><a href="http://domain.net/?v=anyithing" target="_blank">etc....

    which is might contianes more "-s, and sometime the domain.net could be different.

    I would like to get the clean url

    http://domain.net/?v=anyithing

    I used to in column H:
    =MID(G1;13;20) ,but the "anyithing" variable could be longer or shorter, but always ends with ".

    So is it possible somehow?

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: How to filter/copy/paste text between special characters?

    try attachment
    Attached Files Attached Files
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: How to filter/copy/paste text between special characters?

    An alternative might be:

    =TRIM(LEFT(SUBSTITUTE(MID(A1,SEARCH("http",A1),2^15),CHAR(34),REPT(" ",200)),200))

  4. #4
    Registered User
    Join Date
    03-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to filter/copy/paste text between special characters?

    Quote Originally Posted by Firefly2012 View Post
    An alternative might be:

    =TRIM(LEFT(SUBSTITUTE(MID(A1,SEARCH("http",A1),2^15),CHAR(34),REPT(" ",200)),200))
    Thanks for your answer,
    My excel lang. is different, so I've tried to translate to mine, like so:

    =TRIM(BAL(HELYETTE(KÖZÉP(A1,SZÖVEG.KERES("http",A1),2^15),KARAKTER(34),SOKSZOROZ(" ",200)),200))

    or

    =TISZTÍT(BAL(HELYETTE(KÖZÉP(A1,SZÖVEG.KERES("http",A1),2^15),KARAKTER(34),SOKSZOROZ(" ",200)),200))

    I believe it is language issue, and probably not your fault, so thanks your intention to help

  5. #5
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: How to filter/copy/paste text between special characters?

    With your value in A1 and B1 blank, open up the VBE, open up the Immediate Window (ctrl+g) and type in the following and hit Enter at the end of the line:

    Please Login or Register  to view this content.
    VBA shouldn't care if your language version is different (admittedly I haven't tested this though).

  6. #6
    Registered User
    Join Date
    03-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to filter/copy/paste text between special characters?

    Thanks tom1977, the function works!

  7. #7
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: How to filter/copy/paste text between special characters?

    Hi function of Firefly 2012 works great In attachment I translate this on my language (when you open this excel will translate this on yours).
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: How to filter/copy/paste text between special characters?

    Thanks Tom1977

  9. #9
    Registered User
    Join Date
    03-14-2012
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: How to filter/copy/paste text between special characters?

    Thank you guys your effort!

    You are so incredible, the downloaded version also works in my language, so BIG THANK YOU, really…
    I hardly dare to ask
    Meanwhile, my client asked: ”could you collect all of URL-s from cells” for e.g. the HTML of one cell:

    <DIV><P><A href="http://ooop.org/?v=36Mr1V.jpg" target="_blank"><IMG src="http://abcd.org/images/8Mr1V.jpg"></A></P> <P>Some text and other stuff goes here.</P> <P>File:</P> <P><A href="http://small.to?http://bestrest.org/item/blick-blog/145538" target="_blank">http:/xydomain.org/item/k-blog/122338</A></P>
    <P><SPAN></SPAN></P> <P><IMG alt=Link is here src="http://xxx.net/images/anything.png"></P> <P>Otherstuff<SPAN></SPAN>:</P> <P><A href="http://uler.to/mcpehmza/blig-blog" target="_blank">http://what.is/mcpehmza/read-blog.v9.post.3.x.pdf</A></P> <P>Please also visit this link<SPAN></SPAN>:</P>
    <P><A href="http://domea.favour.com/go/2aakt1r77rdd9/?upld=1" target="_blank">http://comcomt.com/ino/280111z1r5urdd9/?ged=1</A></P> <P>Or this<SPAN></SPAN>:</P> <P><A href="http://klop.com/files/n1elroy7/block-blog.v9.1.rar.html" target="_blank">http://mushroom.com/files/10.x.html</A></P>
    <P>More info<SPAN></SPAN>:</P> <P><A href="http://gizi.com/files/pdfs" target="_blank">http://djungle.com/files/ndwhumofj</A></P></DIV>

    …and would like to get:

    http://ooop.org/?v=36Mr1V.jpg
    http://abcd.org/images/8Mr1V.jpg
    http://small.to?http://bestrest.org/...ck-blog/145538
    http://xxx.net/images/anything.png
    http://uler.to/mcpehmza/blig-blog

    As I suppose the ”http://text till first” is constant in all cases, this would be great if I can separate these to other column.

    Please do not answer, if I was unabashed!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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