• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

LEFT and FIND

Adhiraj

New Member
i want to find a special character and return the values left of it, but only the 2 values left to the Special character

for ex

"i will give an offer which you can refuse, ipad at 60 % off"
i would want an formula that should return "60" which is 2 character left of "%" excluding a space

any help is greatly appreciated
Ty
 
Hi Adhiraj ,

Will this special character always be the percent symbol ? Or will it vary ?

Using the MID and FIND functions makes this simple :

=MID(A1 , FIND("%", A1) - 3 , 2)

should give you what you want.

A1 contains the text.

Narayan
 
Thankyou for the reply Narayan.

No the "%" will not be present everytime ... I need to return... If there is a discount, what is the value of the discount
 
No, the special character will not be present always. But the special character under consider does not change. I just need to return the value of discount if there is one... So hence once I find if there is %... I would like to know what is the value of the discount
 
Hi Adhiraj ,

In that case , just wrap an IFFERROR around the earlier formula , as in :

=IFERROR(MID(A1, FIND("%", A1) - 3, 2),0)

Narayan
 
Back
Top