Different Approach using Sumproduct function

Formula to be in A3 of Sheet2 =SUMPRODUCT((Sheet1!A3:A5="Lion")*(Sheet1!B3:B5))

Punnam