HI,
I would like to sort the sheet tabs by adding letter before the filename. Can someone help me correct the formula i made? or any ideas to formulate a solution? Example A. Summary B. Ana Perez
IIF([RecordID] = 1, "A. ",
IIF([RecordID] = 2, "B. ",
IIF([RecordID] = 3, "C. ",
IIF([RecordID] = 4, "D. ",
IIF([RecordID] = 5, "E. ",
IIF([RecordID] = 6, "F. ",
IIF([RecordID] = 7, "G. ",
IIF([RecordID] = 8, "H. ",
IIF([RecordID] = 9, "I. ",
IIF([RecordID] = 10, "J. ",
IIF([RecordID] = 11, "K. ",
IIF([RecordID] = 12, "L. ",
IIF([RecordID] = 13, "M. ",
IIF([RecordID] = 14, "N. ",
IIF([RecordID] = 15, "O. ",
IIF([RecordID] = 16, "P. ",
IIF([RecordID] = 17, "Q. ",
IIF([RecordID] = 18, "R. ",
IIF([RecordID] = 19, "S. ",
IIF([RecordID] = 20, "T. ",
IIF([RecordID] = 21, "U. ",
IIF([RecordID] = 22, "V. ",
IIF([RecordID] = 23, "W. ",
IIF([RecordID] = 24, "X. ",
IIF([RecordID] = 25, "Y. ",
IIF([RecordID] = 26, "Z. ",
"ZZ. "))))))))))))))))))))))))))) + [Sheetname]
I am having a parse error.
Thanks.
If this is under 26 sheets -> CharFromInt([RecordID+64) --- if it's potentially greater than 26 you have to do some floor division and stuff ot get it in to the AA format...
and this gets you to 700 sheets or something ---> if floor([RowCount]/26)=0 then CharFromInt(65+mod([RowCount],26)) else
charfromint((floor([RowCount]/26)+64))+CharFromInt(65+mod([RowCount],26)) endif
Tries this formula using the formula tool but it gave me error - "Parse error at char(45): unknown function "Chr" (Expression #1)
IF Floor(([RecordID] - 1) / 26) = 0 THEN
Chr(65 + Mod([RecordID] - 1, 26))
ELSE
Chr(64 + Floor(([RecordID] - 1) / 26)) + Chr(65 + Mod([RecordID] - 1, 26))
ENDIF
Please advise.
Kamen
@KamenRider The formula provided by @apathetichell is correct, you need to use CharFromInt instead of Chr in your formula
@KamenRider --- hey can you accept my dope solution to your problem?