Thank you for all your replies! I got it to work using the LEN function as presented by Johan and Dunc.