Sorry for being too general.
Here is the formula that its giving the error for
I hope its not too sloppy.
if {Renewal_Information.RNL_Rate_Code} in ['Y','WY','QY']
and ({Renewal_Information_Jt_Mbr.RNL_Rate_Code}[Len({Renewal_Information_Jt_Mbr.RNL_Rate_Code})-1]) = "J"
and ({Renewal_Information_Jt_Mbr.RNL_Rate_Code}[Len({Renewal_Information_Jt_Mbr.RNL_Rate_Code})-4]) = "Z"
then 'JSTORSECJTMB'
else if {Renewal_Information.RNL_Rate_Code} in ['Y','WY','QY']
and ({Renewal_Information_Jt_Mbr.RNL_Rate_Code}[Len({Renewal_Information_Jt_Mbr.RNL_Rate_Code})-4]) = "Z"
then 'NOJSTORSECJTMB'
else if {Renewal_Information.RNL_Rate_Code} in ['Y','WY','QY']
then 'ERROR'
else if not(left({Renewal_Information.RNL_Rate_Code},1) in ['A','B','C','D','G','H','I','O','P','Q','W'])
then 'ERROR'
else if ({Renewal_Information.RNL_Rate_Code}[Len({Renewal_Information.RNL_Rate_Code})-1]) = "J"
and ({Renewal_Information.RNL_Rate_Code}[Len({Renewal_Information.RNL_Rate_Code})-4]) = "Z"
then 'JSTORPRIJTMB'
else if ({Renewal_Information.RNL_Rate_Code}[Len({Renewal_Information.RNL_Rate_Code})-1]) = "J"
and ({Renewal_Information.RNL_Rate_Code}[Len({Renewal_Information.RNL_Rate_Code})-4]) <> "Z"
then 'JSTORINDMB'
else if ({Renewal_Information.RNL_Rate_Code}[Len({Renewal_Information.RNL_Rate_Code})-4]) <> "Z"
then 'NOJSTORINDMB'
else if ({Renewal_Information.RNL_Rate_Code}[Len({Renewal_Information.RNL_Rate_Code})-4]) = "Z"
then 'NOJSTORPRIJTMB'
else 'ERROR'