+ Reply to Thread
Results 1 to 6 of 6

Mid function and first empty space

  1. #1
    Forum Contributor
    Join Date
    11-06-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2007
    Posts
    174

    Mid function and first empty space

    hello -

    can you use the Mid function to seek out a string that starts with a certain letter up to the first empty space?

    Thanks,

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Mid function and first empty space

    The Mid function can't be used to search for anything.

    If you want to search for a character/space in a string use InStr (VBA) or FIND/SEARCH (worksheet).

    Once you've found the character/space then you can use Mid if you want to extract particular data.
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Mid function and first empty space

    Like this for instance
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  4. #4
    Forum Contributor
    Join Date
    11-06-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2007
    Posts
    174

    Re: Mid function and first empty space

    For mine I used:

    Please Login or Register  to view this content.
    Trying to get to the string that starts with 'P' and rteturn it up until the first empty space.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Mid function and first empty space

    It isn't 100% clear what you want but perhaps this.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-19-2013
    Location
    Honolulu
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Mid function and first empty space

    This function will return the first word that being with the letter "p".

    Please Login or Register  to view this content.

+ 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