+ Reply to Thread
Results 1 to 4 of 4

Detect a piece of text from a sentence

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    391

    Detect a piece of text from a sentence

    Hi All,

    Is there anyway to detect specific text from a sentence in excel. for example I have addresses in col A and I want only the post code to be display in Col B.

    See below for an example.

    A B
    15 Galowgate Edinburgh EH12 5DL EH12 5DL
    25 London Road Glasgow G5 3PL G5 3PL

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Detect a piece of text from a sentence

    Is it last 2 words always.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  3. #3
    Forum Contributor
    Join Date
    11-09-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    391

    Re: Detect a piece of text from a sentence

    For this scenario yes,

    But also good to know how to pick up specific part of text in a sentence for example take 2.2 from 'Ford Transit Custom 290 L1 Diesel Fwd 2.2 TDCi 1'

    Quote Originally Posted by kvsrinivasamurthy View Post
    Is it last 2 words always.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,943

    Re: Detect a piece of text from a sentence

    As to the examples in post #1 try the following:
    Formula: copy to clipboard
    =MID(A1,FIND("@",SUBSTITUTE(A1," ","@",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))-1))+1,255)

    *This formula is credited to the linked article.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Formatting a piece of the text in the formula box
    By Ronnet2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-15-2016, 12:25 PM
  2. [SOLVED] Import a piece of text from an other cell
    By alexhantson in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 02-25-2015, 10:42 AM
  3. Searching for more than One piece of text
    By wings1080 in forum Excel General
    Replies: 4
    Last Post: 01-09-2015, 05:22 PM
  4. How to display output from one locked data piece and one client-input data piece?
    By tnovak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2014, 12:48 PM
  5. Replies: 4
    Last Post: 08-13-2014, 11:03 PM
  6. convert numbers into text (need a piece of code)
    By YPotschie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-20-2014, 09:46 AM
  7. Piece together a formulae with text
    By TuboDieselOne in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-09-2014, 05:41 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