December 13, 200619 yr Hi gang, I am creating a table of contents for chapters in a book. I have 3 tables, book, chapter, page. in the chapter table I have a field that uses the min function to find the first page of that chapter from the page table. the problem I have is that the book has a preface and a forward which have roman numeral page numbers. Is there a simple way to convert them? Mike
December 15, 200619 yr A calculation to convert the Roman Numeral numbers I to XXXV Roman (Text field) Number (Calculation field, Number result) = If (Position (Roman, "IX", 1), 9+Length (Roman)*10–20, If (Position (Roman, "IV", 1), 4+Length (Roman)*10–20, If (Right (Roman, 1) = "X", 10*Length (Roman), If (Right (Roman, 1)="V", 5+(Length (Roman)*10–10), If (Left (Roman, 3) = "XXX", 30+(Length (Roman)–3), If (Left (Roman, 2)="XX", 20+If (Position (Roman, "V", 1), 4, 0)+(Length (Roman)–2), If (Left (Roman, 1)="X", 11+If (Position (Roman, "V", 1), 4, 0)+(Length (Roman)–2), If (Left (Roman, 1)="V", 5, 1)+(Length (Roman)–1)))))))) *
December 15, 200619 yr You can take a look at this custom function and tweak it to a field value rather than Get(PageNumber) if you needs custom number conversion. http://www.briandunning.com/cf/21
December 16, 200619 yr I thought Mike wanted to convert Roman to Arabic: http://www.briandunning.com/cf/85
Create an account or sign in to comment