I have a second set of formulas I want to combine. This is more complicated.
First I put the gender, either M or F in a cell, I want the new formula to read the "Gender" cell then use the appropriate formula to run the lookup.
The lookup functions work and the tables are built.
=IF(OR(D2="",D2<17,E2=""),"",VLOOKUP(E2,'Male Tables'!A4:K77,IF(D2>61,11,ROUNDUP((D2-16)/5+1,0)),TRUE))
=IF(OR(D4="",D4<17,E4=""),"",VLOOKUP(E4,'Female Tables'!A4:N50,IF(D4>61,11,ROUNDUP((D4-16)/5+1,0)),TRUE))