Here I will discuss a interesting formula. With this formula we can calculate percentage of a text matching with another text.

In the above picture I have shown two cells. First cell having a long text value and the second cell having a small one. I will calculate **If the second text is found in first text then how much percentage is matching.**

So I will make an easy formula by using IF, COUNTIF and LEN functions.

**=IF(COUNTIF(B2,”*”&B5&”*”)>0,LEN(B5)/LEN(B2),0)**

The formula is working good. I had previously discussed a lesson about how to count cells which contain any part of the text.