Description

The VBA macro included with this file will expand elided page number ranges in entries when a $L_ locator label is present and a $Er error label is absent.

Processing is limited to ‘pure’ numbers. Locator ranges containing contiguous letter prefixes or suffixes will not be expanded. 100-9 will be expanded but p100-9 will not.

Ranges to the left of the $L_ label are not expanded.

When to use

Following Audit, after any errors labeled with $Er labels have been corrected.

Test data

The macro can be run on the data below. Copy into another file first and save as a docm. The data is supplied so users can understand what the macro does before using it on a real index.

no locator label 701-9, 1230-9, 1234-99, 1470-99

error label 470-75 $L_100-1, 200-2, 333-4 $ErL02_

ten 51-2 $L_51-9, 61—9, 71–9, 819

hundred 150-9 $L_123-9, 123—99, 124–9, 12499, 100-09

thousand 1510-9 $L_1234-9, 1234—99, 1235–999, 12359, 1500-09

ten thousand 66850-1 $L_12345-9, 12345—99, 12345–999, 12345-9, 12000-09

hundred thousand 567890-9 $L_123456-9, 123456—99, 123456–999, 1234569, 150000-09

© B Campbell 2016