How to Outline Index numbering in Excel

In this article, we will learn How to Outline Index numbering in Excel

Scenario:

In simple words, while working with the index values in a dataset. Sometimes given a condition i.e. when we need to number and group the index numbering as per mentioned subcategories. You can perform the solution to this problem easily using the excel functions as explained below.

How to solve the problem?

For this article, we will be required to use the COUNTA function & IF function. Now we will make a formula out of these functions. Here we are given a numbered list and a subcategory list. And we need to generate a list of

Generic formula:

= COUNTA ( $D$4 : D4 ) & "." & IF (D4<>"", 1 , MID(F3, FIND (".",F3)+1, LEN(F3))+1 )

$D$4:D4 - absolute array reference

D4 - first cell

<> - not equals to operator

"" - empty cell

Example:

All of these might be confusing to understand. So, let's test this formula via running it on the example shown below.

Here we have some data of numbers and subcategories in adjacent cells and we will create a list of numbering and grouping using the above-explained formula.

Firstly,  we need to get the first value as 1.1, extract integer numerical values and then return sequential decimal numbers based on condition. Now we will use the following formula to get the sum.

Use the Formula:

= COUNTA ( $D$4 : D4 ) & "." & IF (D4<>"", 1 , MID(F3, FIND (".",F3)+1, LEN(F3))+1 )

Explanation:

  • COUNTA ( $D$4 : D4 ) returns the count of number of values in array ignoring blank cells which will be the integer part of the index.
  • For the decimal part will be using the IF condition. IF the cell is D4 cell is not blank it will return decimal part as 1 which concatenates with integer part and decimal character.
  • If the decimal part is blank then it checks the previous output cell and extracts its value and adds 1 to it for the next output.

Here the arguments to the function are given as array reference and cell references. Now use Ctrl + D to copy the formula from one cell to the remaining ones.

As you can see the formula returns the index value as per the subcategory.

Here are some observational notes are shown below.

Notes:

  1. The formula only works with numbers and text both
  2. The IF function checks for the start of each new integer index.
  3. There must be blank cells in the first category list. So as to get the INteger part right.
  4. Subcategory arrays can be blank or can have numbers or text both.
  5. The list array length must be of the same as the code length else the function.

I hope this article about How to Outline Index numbering in Excel is explanatory. Find more articles on COUNT functions here. Please share your query below in the comment box. If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook. We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write to us at info@exceltip.com

Related Articles

COUNTIFS with Dynamic Criteria Range : Count cells depstartent on other cell values in Excel.

COUNTIFS Two Criteria Match : Count cells matching two different criteria on list in excel.

COUNTIFS With OR For Multiple Criteria : Count cells having multiple criteria match using the OR function.

The COUNTIFS Function in Excel : Count cells dependent on other cell values.

How to Use Countif in VBA in Microsoft Excel : Count cells using Visual Basic for Applications code.

How to use wildcards in excel : Count cells matching phrases using the wildcards in excel

Popular Articles

50 Excel Shortcut to Increase Your Productivity : Get faster at your task. These 50 shortcuts will make you work even faster on Excel.

How to use the VLOOKUP Function in Excel : This is one of the most used and popular functions of excel that is used to lookup value from different ranges and sheets.

How to use the COUNTIF function in Excel : Count values with conditions using this amazing function. You don't need to filter your data to count specific values. Countif function is essential to prepare your dashboard.

How to use the SUMIF Function in Excel : This is another dashboard essential function. This helps you sum up values on specific conditions.

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.

Visit Us On TwitterVisit Us On FacebookVisit Us On Youtube