How do I generate numeric values from non-numeric entries?