What I am looking to accomplish is to return the subaccount string from the "subLedger" field if the criteria exists to do so. All i have to go on is if the string of .####. exists. There can be only one sub-account per complete account number.
When i apply your solution it returns the entire field, rather than the right four characters, but i think that is adjustable if I can following the functions.
Less elegant and problematic if there is a data entry issue somehow:
Code:
SubAccount: IIf(Len([SubLedger])-Len(Replace([SubLedger],".",""))=2,"SA" & Right([SubLedger],4),"NOSUBACCOUNT")