Search code examples
excelif-statementexcel-formulaextractpercentage

How do I make Excel extract percentages from a cell


Has anyone figured out how to extract the numbers 4.25%-4.5% and 4%-4.5% from the cell?

enter image description here
enter image description here

Thanks!

I tried the formula for the value on the left:

=IFERROR(IF(D5="",0,LEFT(D5,FIND("%",D5))+0),"N/A")

I tried the formula for the value on the right:

=IFERROR(IF(D5="",0,RIGHT(D5,FIND("%",D5))+0),"N/A")

It works for Baltimore but is not working for New Jersey for me.


Solution

  • These should work. You're probably missing converting string to a number.

    =LEFT(D6,FIND("-",D6)-1)+0
    =MID(D6,FIND("-",D6)+1,LEN(D6))+0
    

    You could use the value function, but I just use +0 as it's easy to remember as it's shorter and how I most frequently RSVP to social invitations.