+ Reply to Thread
Results 1 to 4 of 4

Substring expression help

  1. #1
    Registered User
    Join Date
    06-21-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    5

    Substring expression help

    If SUBSTRING() is a function that returns part of a text string based on a specific starting position and a specific number of characters, such that SUBSTRING('Mt. Rushmore',5,4) = 'Rush', write a SUBSTRING() expression to isolate America's third president's first name from the following string: 'Jefferson, Thomas

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Substring expression help

    There are several ways to get the desired output in this case.
    Lets assume that you have Jefferson, Thomas in A1, then see what the following formulas will return....

    Please Login or Register  to view this content.
    In the above formula, you are trying to extract everything from the right of the string after the Space. So with the Find function, you find the position of space character and use Right function to get everything after the space character. So the above formula will return Thomas.


    Please Login or Register  to view this content.
    In this formula, you are trying to extract everything from the left before the comma. So with the Find function in this case, you find the position of comma in the string and with the help of Left function, you get everything before the comma in the string. The above formula will return Jefferson.

    Hope this helps.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    06-21-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    5

    Re: Substring expression help

    Thanks sktneer.

    Could you help with this?

    If LEFT('dog',1) = 'd' and RIGHT('dog',2) = 'og', then what is: LEFT(RIGHT('transparent',7),5)?

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Substring expression help

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.

    http://www.excelforum.com/access-tab...pressions.html

+ 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. Search substring within range, report the substring found
    By Brooke1578 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-20-2012, 03:56 PM
  2. Search for SubString
    By Hallet in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2012, 04:38 AM
  3. [SOLVED] Extract Substring, then Ignore that Substring, while collecting data from Other substrings
    By Sameki121 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2012, 05:21 PM
  4. Geeting substring value
    By dr.Murthy in forum Excel General
    Replies: 0
    Last Post: 03-02-2011, 03:29 AM
  5. substring operation
    By jana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2005, 02:05 PM

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