Condition based formula

Hi!

Is there a method to convert certain rows in a column to number and if the the row contains letters (not number) to leave as string?