Decrementing Word Number List Without Hard Coded Value

There are times when you might want to create a list in reverse numbered order. For example, if you are listing projects or accomplishments in reverse chronological order (most recent at the top) and want to number them.

You've probably seen many sites around the web that have solutions to the problem: How do you make a list of numbers that count down?

Most solutions will have you hard code the total number in the formula. They look something like this:

{ =35 -- SEQ CountDown }

This works great but the day you decide to add or remove one, you will have to go and manually update the number 35 thoughout the document. This can be time consuming which really defeats the point of using a field to do the calculations for you. Some developers have actually created scripts to do the work for you. Unfortunately they are usually inconvinient to work with and you probably don't want add a macro to your document.

The following solution not only overcomes these limitations, it's dynamic in that you can add and remove as many instances as you want, the press ctrl-a to select your document and press F9 to update all the fields.

  1. Place the cursor where you want to insert your first/highest number.
  2. Add the following field formula anywhere you want the number to count down:
    { = { SEQ Count TotalCount } -- { SEQ Count} }
  3. At the end of your document, add the following field formula anywhere at the end of the document:
    { SEQ Count \h }
  4. Finally, bookmark the formula in step 4, calling it TotalCount.
When creating field, do not type in the { } brackets. Press CTRL-F9 and then type inside it.

That's it. The following lines will produce a countdown from 4 to 1:

{ = { SEQ Count TotalCount } -- { SEQ Count} }
{ = { SEQ Count TotalCount } -- { SEQ Count} }
{ = { SEQ Count TotalCount } -- { SEQ Count} }
{ = { SEQ Count TotalCount } -- { SEQ Count} }
{ SEQ Count \h }   <== Don't forget to bookmark this line. The bookmark must be called TotalCount for it to work or you will need to also change it in the above lines.

Important Notes

  • Anytime you add or remove an item in your list, you will only need to press CTRL-A followed by F9 to update this numbering throughout your document.
  • Tip: To show or hide all the field codes in the document, press ALT-F9.

Leave a Reply

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