+ Reply to Thread
Results 1 to 4 of 4

Find string and return both ends of either side

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Find string and return both ends of either side

    In column B I have words in every cell. What formula can search for ":" within the cell and return the first 2 characters to the left and to the right of ":".

    So a cell might have "Data Job Word 09:15 Work Race" and I'd want to just return 09:15

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Find string and return both ends of either side

    Try

    B1
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Find string and return both ends of either side

    Works a charm.

    Lastly, how would I alter it so that it searches for ":" and then returns me everything to the left of it except the first 3 characters. So from my example in the original post I'd like it to return "Data Job Word"

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Find string and return both ends of either side

    Then try

    Formula: copy to clipboard
    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)

Similar Threads

  1. [SOLVED] delete those parts of string which start with x and ends with y
    By wali in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-29-2018, 07:56 PM
  2. [SOLVED] Return 2 digit numeral from either side of - in an alpha numeric string
    By UnitedCloud01 in forum Excel General
    Replies: 3
    Last Post: 08-10-2017, 11:41 PM
  3. Replies: 3
    Last Post: 04-27-2016, 05:18 AM
  4. Replies: 4
    Last Post: 03-30-2015, 03:20 PM
  5. [SOLVED] How Do I Find and Return a String When Only Part of that String is Known?
    By Foamy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-08-2014, 05:31 AM
  6. [SOLVED] Check if string ends with one of the strings from an array
    By alienss in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-15-2013, 02:58 PM
  7. [SOLVED] the ' symbol ends the SQL string, how do you replace it Excel
    By Valori in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2006, 09:50 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