PS. Addendum: Here's the formula that I used:

=IF(I2="female","",AC6(VLOOKUP,AC6,$AD$6:$AE$12,2,"TRUE","",IF(I2="male",AC20,(Vlookup,AC20,$AD$20:$AE$26,2,0))

It comes out wrong and I don't know how to add the "age" into it. Thanks again!