+ Reply to Thread
Results 1 to 20 of 20

Numbers with percentage to be extracted from text

  1. #1
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Numbers with percentage to be extracted from text

    Respected Excellers there!

    I have an excel file in which Column D contains a text string in which mentioned is the percentage of something as "If the employee registers so and so number of cases the percentage will be x%" . and these are many . So I need to extract the percentage in another column so that I may use it a specific formula.

    Remember the position of my text in the string varies. I am not allowed to use macros in my sheet. is there any one cell formula to extract the percentage ?

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: Numbers with percentage to be extracted from text

    Please post a sample file showing a range (variability) of the data you have.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Numbers with percentage to be extracted from text

    This should do it:
    =RIGHT(SUBSTITUTE(LEFT(A1,FIND("%",A1)-1)," ",REPT(" ",255)),255)+0
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  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: Numbers with percentage to be extracted from text

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


    Use this formula with Ctrl+Shift+Enter

    Thanks
    Ankur

  5. #5
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Numbers with percentage to be extracted from text

    Respected Excellers there!

    I have an excel file in which Column D contains a text string in which mentioned is the percentage of something as "If the employee registers so and so number of cases the percentage will be x%" . and these are many . So I need to extract the percentage in another column so that I may use it a specific formula.

    Remember the position of my text in the string varies. I am not allowed to use macros in my sheet. is there any one cell formula to extract the percentage ?

    Find the attached testfile.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Numbers with percentage to be extracted from text

    Sooo... if the data begins in c, then modify the formula to

    =RIGHT(SUBSTITUTE(LEFT(C1,FIND("%",C1)-1)," ",REPT(" ",255)),255)+0

    formatting the cells to General.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: Numbers with percentage to be extracted from text

    Glenn has given you the solution.

  8. #8
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Numbers with percentage to be extracted from text

    Thanks Gelen....I think we are near to solution. please find the attached file in which I used your formula.but how can I remove the error .
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Numbers with percentage to be extracted from text

    Nice work Glenn!

    If you want in percentage, format the output cells to show in percentage to (e.g. 0%) and use

    =RIGHT(SUBSTITUTE(LEFT(C1,FIND("%",C1)-1)," ",REPT(" ",255)),255)%

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

    Re: Numbers with percentage to be extracted from text

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


    What about this formula?

    Thanks
    Ankur
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,196

    Re: Numbers with percentage to be extracted from text

    =(RIGHT(SUBSTITUTE(LEFT(C1,FIND("%",C1)-1)," ",REPT(" ",255)),255)+0)/100 as a %

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Numbers with percentage to be extracted from text

    The answer to your Q is in the last line of Post 6

    "formatting the cells to General". Currently, they are formatted as Percentage.

  13. #13
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Numbers with percentage to be extracted from text

    O I did not read your last instruction...and I wanted it with the percentage mark.I removed (-1) from your formula and it worked .The problem is solved thanks.

  14. #14
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Numbers with percentage to be extracted from text

    Berlan Your formula is also working.Thanks

  15. #15
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Numbers with percentage to be extracted from text

    Nice.This is also working according to my needs.thanks

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Numbers with percentage to be extracted from text

    Thanks for the Rep and glad to have helped. I was next door to you last week - in Islamabad with work!! Total luxury in the Serena hotel....

  17. #17
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Numbers with percentage to be extracted from text

    ankur thank you too,your formula is also producing the required result.

  18. #18
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Numbers with percentage to be extracted from text

    Glad to know that you'v been to my country.If I were at Serena then I would have hosted you myself.

  19. #19
    Registered User
    Join Date
    09-02-2019
    Location
    Pakistan
    MS-Off Ver
    2016
    Posts
    2

    Re: Numbers with percentage to be extracted from text

    Hi Glenn, thank you for your solution. Saved my day!

    Spent 15 minutes understanding your formula. Now I know a practical use case of SUBSTITUTE and REPT function. One thing I can't seem to understand is why use 255 in REPT function? Was there some reason or just an arbitrary number

  20. #20
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Numbers with percentage to be extracted from text

    Pretty much arbitrary...

+ 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. Excel 2007 : Numbers to be extracted
    By sushil10s in forum Excel General
    Replies: 5
    Last Post: 08-20-2015, 09:07 AM
  2. While Extraction of data text getting extracted in two rows
    By sanjay2210.msl in forum Excel General
    Replies: 4
    Last Post: 08-22-2014, 12:14 PM
  3. [SOLVED] SUMIF Query: How to summarise values based on data extracted from a text string
    By The_Snook in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-17-2013, 10:12 AM
  4. [SOLVED] Time values from extracted text strings
    By Steve Roth in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-08-2012, 01:39 PM
  5. Replies: 7
    Last Post: 08-25-2012, 12:53 PM
  6. Last row of text file not extracted by Function
    By jaimemcc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2011, 01:44 PM
  7. Replies: 1
    Last Post: 04-01-2005, 01:06 AM

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