There isn't a set formula, really: due to some bicycles having differently shaped top tubes (different angles, dropping, so on), the height of the tube shouldn't be the guiding factor unless its uncomfortable to stand over.
Have you taken a ride on the 17.5" and felt if you thought it was too cramped?