+ Reply to Thread
Results 1 to 8 of 8

Extracting all text after and including a percentage value that varies in length

  1. #1
    Registered User
    Join Date
    12-09-2014
    Location
    NZ
    MS-Off Ver
    2010
    Posts
    18

    Extracting all text after and including a percentage value that varies in length

    Hi I have a text string in excel such as

    there were 120 visitors to the park today 25% of whom were children. I want to excluded everything from 25% from the statement. the only problem is that 25% could be 25.5% or 25.998% etc. there is also no commonality in the word prior to the % value.

    I have tried =LEFT(B2;FIND("0.0##%";B2)) but it does not recognise the %.

    Any help would be greatly appreciated

    Thanks

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,409

    Re: Extracting all text after and including a percentage value that varies in length

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



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    12-09-2014
    Location
    NZ
    MS-Off Ver
    2010
    Posts
    18

    Re: Extracting all text after and including a percentage value that varies in length

    Hi thanks for that but that displays everything to the right o 25%. I want everything to the left of 25% eg there were 120 visitors to the park today.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,604

    Re: Extracting all text after and including a percentage value that varies in length

    Does,
    "...excluded everything from 25%..." mean you want just the 25%
    or: "...25% of whom were children"
    Ben Van Johnson

  5. #5
    Registered User
    Join Date
    12-09-2014
    Location
    NZ
    MS-Off Ver
    2010
    Posts
    18

    Re: Extracting all text after and including a percentage value that varies in length

    Hi what show in the next cell "there were 120 visitors to the park today" and excluded everything else.

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Extracting all text after and including a percentage value that varies in length

    Like this?

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



    A
    B
    1
    there were 120 visitors to the park today 25% of whom were children there were 120 visitors to the park today
    Sheet: Sheet2
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,409

    Re: Extracting all text after and including a percentage value that varies in length

    Your thread title says:
    Extracting all text after
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-09-2014
    Location
    NZ
    MS-Off Ver
    2010
    Posts
    18

    Re: Extracting all text after and including a percentage value that varies in length

    Hi

    Thanks for your reply. The TRIM formula =TRIM(LEFT(A2,FIND("%",A2)+1)) is still including the 25% in the result and I need to exclude this. eg I need the output to just say "there were 120 visitors to the park today"

    The other formula =LEFT(A1,LOOKUP(10^308,FIND(" ",LEFT(A1,FIND(" ",A1&" ",FIND("%",A1))-1),ROW(INDIRECT("1:"&LEN($A1)))))) is providing the correct answer so thank you for that.
    Last edited by MichelleP; 01-15-2016 at 08:19 PM.

+ 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. Moving data with varies in length
    By juegen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-29-2015, 06:33 PM
  2. [SOLVED] Extracting varying length text from the middle of a string
    By tm314159 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-20-2014, 07:23 PM
  3. Extracting Random Length Text from a cell
    By bbarry404 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-28-2013, 08:56 AM
  4. [SOLVED] Extracting Text from a string of Text & Digits of variable length
    By hastex in forum Excel General
    Replies: 6
    Last Post: 06-06-2012, 09:11 AM
  5. Extracting a number from a string that varies in length...
    By lucraft in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2012, 11:30 AM
  6. Find character when the length varies
    By Rookie_User in forum Excel General
    Replies: 3
    Last Post: 04-12-2006, 02:20 PM
  7. extracting data from a text string of varying length
    By andy from maine in forum Excel General
    Replies: 4
    Last Post: 03-28-2005, 03:06 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