Parse a variable star designation
Python 3, 121 bytes



lambda z,a='ABCDEFGHIKLMNOPQ',r='RSTUVWXYZ':int(z[1:])if z[2:]else[t+u for t in['',*r+a]for u in a+r if t&lt;=u].index(z)-15


Try it online!

Explanation

The list comprehension [t+u for t in['',*r+a]for u in a+r if t&lt;=u] evaluates to these strings:

t='':   A  B  C  D  E  F  G  H  I  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z
t='R':                                                 RR RS RT RU RV RW RX RY RZ
t='S':                                                    SS ST SU SV SW SX SY SZ
t='T':                                                       TT TU TV TW TX TY SZ
t='U':                                                          UU UV UW UX UY SZ
t='V':                                                             VV VW VX VY VZ
t='W':                                                                WW WX WY WZ
t='X':                                                                   XX XY XZ
t='Y':                                                                      YY YZ
t='Z':                                                                         ZZ
t='A': AA AB AC AD AE AF AG AH AI AK AL AM AN AO AP AQ AR AS AT AU AV AW AX AY AZ
t='B':    BB BC BD BE BF BG BH BI BK BL BM BN BO BP BQ BR BS BT BU BV BW BX BY BZ
...
...
...
t='Q':                                              QQ QR QS QT QU QV QW QX QY QZ


If there are any characters past the first two (z[2:]) then the result is int(z[1:]). Otherwise (i.e. if there are only one or two characters) we look the string up in the list we created and subtract 15 from the index.