Value function to convert text to numbers