+ Reply to Thread
Results 1 to 6 of 6

Can I find a string with or without a space after the last charact

  1. #1
    emil
    Guest

    Can I find a string with or without a space after the last charact

    I have a word in a Cell. I copy it in " Find". I Search in another Sheet that
    word. If I have extra spaces before or after it I can not find it often it
    exists. The word changed. I tried to write a macro but it doesn’t work. Can
    helps me someone?
    Thanks millions.
    Emil


  2. #2
    Bob Phillips
    Guest

    Re: Can I find a string with or without a space after the last charact

    Try setting the Lookin value to xlPart in the Find statement.

    --

    HTH

    Bob Phillips

    (replace xxxx in the email address with gmail if mailing direct)

    "emil" <[email protected]> wrote in message
    news:[email protected]...
    > I have a word in a Cell. I copy it in " Find". I Search in another Sheet

    that
    > word. If I have extra spaces before or after it I can not find it often it
    > exists. The word changed. I tried to write a macro but it doesn't work.

    Can
    > helps me someone?
    > Thanks millions.
    > Emil
    >




  3. #3
    Registered User
    Join Date
    03-29-2006
    Location
    Belfast N Ireland
    Posts
    10
    not a very high tech way but ......

    the find command so long as the 'match entire contents' box is not ticked would not worry about the spaces.

    eg if your cell you are copying is 'test ' on the other sheet if you search for 'test' it should find all instances regardless of spaces.

    also you have the chance to use the TRIM command, as it will strip the spaces off the end of cells.

    one thing to watch out for is if the second sheet you are looking on has the word as the result of a formula as sometimes it searches the formula code and not the results

  4. #4
    emil
    Guest

    Re: Can I find a string with or without a space after the last cha

    Thank very much, but I want to write a macro

    "Bob Phillips" a scris:

    > Try setting the Lookin value to xlPart in the Find statement.
    >
    > --
    >
    > HTH
    >
    > Bob Phillips
    >
    > (replace xxxx in the email address with gmail if mailing direct)
    >
    > "emil" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have a word in a Cell. I copy it in " Find". I Search in another Sheet

    > that
    > > word. If I have extra spaces before or after it I can not find it often it
    > > exists. The word changed. I tried to write a macro but it doesn't work.

    > Can
    > > helps me someone?
    > > Thanks millions.
    > > Emil
    > >

    >
    >
    >


  5. #5
    emil
    Guest

    Re: Can I find a string with or without a space after the last cha


    Thank very mach, I shall try this
    Emil

    "lister_d_000169" a scris:

    >
    > not a very high tech way but ......
    >
    > the find command so long as the 'match entire contents' box is not
    > ticked would not worry about the spaces.
    >
    > eg if your cell you are copying is 'test ' on the other sheet if you
    > search for 'test' it should find all instances regardless of spaces.
    >
    > also you have the chance to use the TRIM command, as it will strip the
    > spaces off the end of cells.
    >
    > one thing to watch out for is if the second sheet you are looking on
    > has the word as the result of a formula as sometimes it searches the
    > formula code and not the results
    >
    >
    > --
    > lister_d_000169
    > ------------------------------------------------------------------------
    > lister_d_000169's Profile: http://www.excelforum.com/member.php...o&userid=32950
    > View this thread: http://www.excelforum.com/showthread...hreadid=548349
    >
    >


  6. #6
    emil
    Guest

    Re: Can I find a string with or without a space after the last cha

    TRIM is very good
    Thank very mach
    Emil

    "emil" a scris:

    >
    > Thank very mach, I shall try this
    > Emil
    >
    > "lister_d_000169" a scris:
    >
    > >
    > > not a very high tech way but ......
    > >
    > > the find command so long as the 'match entire contents' box is not
    > > ticked would not worry about the spaces.
    > >
    > > eg if your cell you are copying is 'test ' on the other sheet if you
    > > search for 'test' it should find all instances regardless of spaces.
    > >
    > > also you have the chance to use the TRIM command, as it will strip the
    > > spaces off the end of cells.
    > >
    > > one thing to watch out for is if the second sheet you are looking on
    > > has the word as the result of a formula as sometimes it searches the
    > > formula code and not the results
    > >
    > >
    > > --
    > > lister_d_000169
    > > ------------------------------------------------------------------------
    > > lister_d_000169's Profile: http://www.excelforum.com/member.php...o&userid=32950
    > > View this thread: http://www.excelforum.com/showthread...hreadid=548349
    > >
    > >


+ 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