+ Reply to Thread
Results 1 to 7 of 7

Only show data before a given character

  1. #1
    Registered User
    Join Date
    05-26-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Only show data before a given character

    Hello all,

    I am looking to return the characters before the "u". Right and Left syntax does not help me seeing the characters before the "u" differ.

    2u10000~a x 2
    a81u3000~- x 44
    1a81u300~- x 8
    cg8zu30000~-
    17uar~c
    45u10~a
    517uar0



    Thank you in advance.
    John

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Only show data before a given character

    Assuming those values are in A1 going downward, put this in B1 and copy down:

    =LEFT(A1, SEARCH("u", A1)-1)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-26-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Only show data before a given character

    That works,

    Thank you very much!

  4. #4
    Registered User
    Join Date
    05-26-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Only show data before a given character

    Question... What if I wanted to return the characters to the Right of the "U".

    Replacing Left with Rights seem to still show the "u" plus extra characters.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Only show data before a given character

    That would be:

    =RIGHT(A1, LEN(A1)-SEARCH("u",A1))

  6. #6
    Registered User
    Join Date
    05-26-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2007
    Posts
    45

    Re: Only show data before a given character

    What does the LEN do?

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Only show data before a given character

    Measures Length of a string. You can press F1 in Excel and read the builtin help file on any given function you come across.

+ 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. Show all font options of a single character
    By mackensteff in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-27-2012, 09:36 PM
  2. Replies: 2
    Last Post: 05-14-2012, 07:55 AM
  3. Make Cell show only first character
    By redjay in forum Excel General
    Replies: 1
    Last Post: 04-30-2008, 12:17 PM
  4. [SOLVED] [SOLVED] show character value of a month rather than numeric?
    By jim sturtz in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-17-2006, 04:45 PM
  5. [SOLVED] importing undelimited text file data, character-by-character
    By The Mos$ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-26-2005, 07:10 AM

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