Thursday, May 15, 2014

How to find character in text using excel formula ?

You can use below formula to find the character in any word.

e.g. cell B1 contains the text Marks with 50% and we need to find if it contains %, we can write the below formula - 

=MID(B1,FIND("%",B1,1),1)

Output of the above formula will be %.



You can further customize this formula to write Found -

=IF(MID(B1,FIND("%",B1,1),1)="%","Found")

Output of the above formula will be Found.



If there is no "%" in cell B1 the formula will return #value! error, to overcome this we can customize the formula as below -

=IFERROR(IF(MID(B1,FIND("%",B1,1),1)="%","Found"),"Not Found")

If the character is missing in cell B1 then the output of the above formula will be Not Found.



You can replace the % to any character you need to find and you will get the output accordingly.


Done....

No comments:

Post a Comment