What you could do is add a 4th column and put a Yes in there when Actual weight is smaller or equal to ideal weight and a No when it's larger. That's a simple formula. You could even use a margin in there, saying that 5 above or 5 below ideal weight is still a Yes and everything else is a No.
That way you can also trigger the ones that are underweight.
Then count the number of females and count the number of "Yes" in the 4th column that are also female. Use that number as a percentage of the total number of females.
Do the same with the males.