You could have a helper cell with a formula.
=LOOKUP(A1,{"cat","dog","goat","horse","lion","ocelot";8,9,3,7,6,4})
Or to change the cell value that you typed into.
Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Range)
Set r = Range("A1:A10")
If Intersect(Target, r) Is Nothing Then
Exit Sub
End If
vals = Array("Cat", "Dog", "Goat", "Horse", "Lion", "Ocelot")
nums = Array(8, 9, 6, 3, 7, 4)
For Each rr In r
inum = 0
For i = LBound(vals) To UBound(vals)
If rr.Value = vals(i) Then
inum = nums(i)
End If
Next
If inum > 0 Then
rr.Value = inum
End If
Next
End Sub
Gord Dibben MS Excel MVP