Everything depends on whether or not the numbering that *follows* the
section number is linked to the section number itself.
Section 8
8.1
8.1.1
Based on your description it does not sound as if this is the case,
since an unnumbered section thrown into the middle of numbered sections
would produce this result:
Section
.1
.1.1
Assuming there's no linkage between the section number and the
numbering that follows it, you don't need a macro to solve the problem.
Use a LISTNUM or SEQ field for the numbering, and when there's no
section number, just don't use a field.
If this doesn't work for you, post again showing exactly what the
section numbering/subsequent numbering look like.