Suppose I know some indexes like 4, 7, 10,11, 13 and so on in sequence then I should put in dashes for the missing values like this:

- - - 4- - 7- - 10 11 - 13 etc

How do I program this? I know the indexes and the number of indexes.

Any help much appreciated

Thank you