The result is a value like “1.1”.

If B5 is not blank, it means we have a new level 1 heading and IF returns 1.

This is a bit tricky, because the outline number is a text string, not a number.

Excel formula: Automatic row numbers

That means we need to extract the value with a text function before we can increment.

Notice we then add 1 directly to the result, which is still text.

Finally, the level 1 and level 2 numbers are concatenated together with a period (".")

Excel COUNTA function

COUNTA does not count empty cells.

For example, =MID(“apple”,2,3) returns “ppl”.

When the text is not found, FIND returns a #VALUE error.

Excel MID function

LEN will also count characters in numbers, but number formatting is not included.

Excel FIND function

Excel LEN function