+ Reply to Thread
Results 1 to 11 of 11

Extract from varied texts

  1. #1
    Registered User
    Join Date
    08-29-2018
    Location
    SW, US
    MS-Off Ver
    2010
    Posts
    5

    Post Extract from varied texts

    I'm looking for a formula (complex, I think) that will do the following.

    There are in 9 separate rows (cells) in Col A.(see entries below) I need to extract 2p-7p only into a cell in Col B. If Col A is blank,(row 5) then Col B should be as well.

    x 2p-7p Op Canyon 1+4
    x2 2p-7p
    x2 2p-7p xfact
    2p-7p pop Lazy 1+4

    2p-7p
    2p-7p Up
    2p-7p Op Xray
    "2p-7p"

    Thank you in advance...

  2. #2
    Registered User
    Join Date
    02-14-2018
    Location
    India
    MS-Off Ver
    2007
    Posts
    13

    Re: Extract from varied texts

    Formula for B1 =IFERROR(MID(A1,SEARCH("2p-7p",A1,1),5),"")

    hope this will help

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,862

    Re: Extract from varied texts

    may be:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or
    may be opposite:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or ...

    Will you please attach a SMALL sample Excel workbook(s) (10-20 rows of data is usually enough)? Please don't attach a picture of one or text inside a post (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. (If trere are typical cases like: all unique values/duplicates could occur, day/night, nobody present/several persons at once, before/on/past due, etc. - please show them all or at least indicate in text) The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution(s) is/are also shown (mock up the results manually).

    3. Make sure that all confidential/restricted information (either personal or business) like real e-mails, social security numbers, bank accounts, etc. is removed first!!

    To attach an Excel file you have to do the following: Just before posting, scroll down and press Go Advanced button and then scroll down and press Manage Attachments link. Now follow the instructions at the top of that pop-up screen.
    Best Regards,

    Kaper

  4. #4
    Registered User
    Join Date
    08-29-2018
    Location
    SW, US
    MS-Off Ver
    2010
    Posts
    5

    Post Re: Extract from varied texts

    My apologies, the suggestion worked, however...
    I did not fully represent the actual data variations for my problem. The info I need to extract changes from cell to cell.
    I have uploaded an example which has been edited for privacy, but is a copy of actual types of data.

    Thank you again for any help you can provide.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Extract from varied texts

    Hi,

    For your uploaded sample, use this formula in C3 copied down:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See attached.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-29-2018
    Location
    SW, US
    MS-Off Ver
    2010
    Posts
    5

    Re: Extract from varied texts

    Thank you so much...

    Almost perfect...

    If there is an entry of 7p-9:30p, the result is 7p-9:3 instead of 7p-9:30p. I do some further work with result, and 9:3 becomes 9:03 instead of 9:30

    The rest seem to be working as I go through the various entries...

  7. #7
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Extract from varied texts

    Quote Originally Posted by rmexcell View Post
    Thank you so much...

    If there is an entry of 7p-9:30p, the result is 7p-9:3 instead of 7p-9:30p. and 9:3 becomes 9:03 instead of 9:30

    ...
    Those scenarios were Not included in your sample, my formula won't work for those.

    If you need further help, please re-upload a sample with all possible string formats.

  8. #8
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Extract from varied texts

    In F3 try:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    EDIT: It would likely help if you understood how the formulas worked. Here is a good explanation https://exceljet.net/formula/extract...-specific-text

    be aware this formula assumes there isnt another "-" (without quotes) in the string, if there is it will not work.
    Last edited by Zer0Cool; 08-29-2018 at 06:15 PM.
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  9. #9
    Registered User
    Join Date
    08-29-2018
    Location
    SW, US
    MS-Off Ver
    2010
    Posts
    5

    Post Re: Extract from varied texts

    I really appreciate the help...
    Here is updated example file, see lines 12-15.
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor jtakw's Avatar
    Join Date
    05-05-2018
    Location
    CA, USA
    MS-Off Ver
    2016
    Posts
    668

    Re: Extract from varied texts

    This updated formula works for All your samples in Post 9:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See attached.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    08-29-2018
    Location
    SW, US
    MS-Off Ver
    2010
    Posts
    5

    Re: Extract from varied texts

    Well Done!!
    I am grateful for the help. So far, so good as I implement into the master spreadsheet.

+ 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] Need to extract the texts
    By Sekars in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2018, 02:14 AM
  2. [SOLVED] Extract texts from cell to multiple cells?
    By GPMan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2018, 04:40 AM
  3. finding the 3rd to 5th texts in a series of texts
    By managingcrap in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-11-2016, 11:39 PM
  4. [SOLVED] Formula to extract row / right last texts for given texts
    By thilag in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-30-2015, 02:51 AM
  5. [SOLVED] To extract texts from a cell
    By Dewdrop in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-25-2014, 10:26 AM
  6. extract text from varied string
    By voicetec in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-15-2013, 12:36 PM
  7. Extract texts from a cell and paste it to another cell
    By alterego23 in forum Excel General
    Replies: 3
    Last Post: 11-22-2012, 11:51 PM

Tags for this Thread

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