I am writing up nearly 50 years of research into my Duncan ancestry as "William Duncan, Chirurgeon, His Ancestors and His Descendants, Including Duncans of Seasyde, Lundie, & Camperdown".
I use Lyx (a front end to Latex) which gives me the option of indexing and of course I am going to use that.
I have chosen to use the following format for the index

Adam (1731-1804), 30, 33, 40, 43, 48–54, 59, 62,64, 67, 78, 85–87, 98, 100, 131, 205, 211, 212,214
Robert Dundas (1785-1859), 49–51, 59, 61–64, 67, 78, 85–87, 98–100, 212, 214, 224, 252, 255
Viscount, see Duncan, Adam (1731-1804)
I think the formatting of the following looks ok (?)
1st Earl of, see Duncan, Robert Dundas (1785-1859)

but which of the following should I use?
2nd Viscount, see Duncan, Robert Dundas (1785-1859)
Viscount, 2nd, see Duncan, Robert Dundas (1785-1859)

The first option separates the entries of successive Viscounts (especially "Viscount" and "2nd,3rd ...Viscount", and the second option keeps them together. Presumably no-one is created "1st Viscount" but they become that as soon as someone becomes "2nd Viscount". I could create another index entry for Adam to cater for his initially being "Viscount" and being, post mortem, "1st Viscount" i.e.
1st Viscount, see Duncan, Adam (1731-1804)
.... perhaps I have answered my own question but would like to hear the opinions of others.

For the record I am using a "whole family" approach to my research and although the Viscounts and Earls are not my direct ancestors they are cousins to them, and ultimately we have a shared ancestry.

I look forward to hearing your opinions