Count Number Of Braces/<> In Excel

The post demonstrated how we could count number of braces “<>” in Excel.

I have personally seen people HTML developers struggling to perform tasks in excel that involves “<>” symbol.

We will use two simple formula in excel called LEN and SUBSTITUTE to count the pair of <>.

As shown below we have HTML code in the cell A2 and we want to count number of <> symbol

Capture

Step 1




Enter the below formula in the cell B2

=(LEN(A2)-LEN(SUBSTITUTE(SUBSTITUTE(A2,”<“,””),”>”,””)))/2

Capture

So this formula works on counting the combination of “>” for each open “<” symbol.

Capture

Hope this helped.

Share The Knowledge

Random Posts

  • Extract Numbers From Chemical Formula In Excel

    Extract numbers from chemical formula in excel, excel formula to extract numbers form chemical formula, excel vba to get numbers from chemical formula, vba code to extract formula numbers in from chemical formula

    Share The Knowledge
  • Insert Symbol In Excel

    There are times when we want to insert some special symbol or characters in excel. We will see how we […]

    Share The Knowledge
  • Dependent/Conditional Drop Down In Excel

    In this topic we will see how to create a dependent drop down in excel i.e. a drop down that […]

    Share The Knowledge
  • Select N Rows In Excel Formula

    In this post we will see how we could select n rows in any excel formula. Suppose we have data […]

    Share The Knowledge

Leave a Reply