The Montgomery County Board of Education voted unanimously yesterday to ask Wilmer S. Cody, the school superintendent in Birmingham, Ala., to replace county school chief Edward Andrews when he retires in July.

Cody, one of more than 100 applicants for the superintendent's job, could not be reached for comment yesterday, but he has said that he would accept the Montgomery post if it is offered.

The board's decision comes as no surprise, and ends a surprisingly smooth and cordial two-month search for a new head of the county's 92,000-student school system.

Cody, 46, visited the county earlier this week and impressed nearly all community and professional groups who met with him. Education union officials were an exception; they said Cody lacks experience in collective bargaining, an area of increasing concern to teachers and other school employes.

School board members said they were particularly impressed with Cody's expertise in desegregation matters and his reputation for fairness that enabled him to stabilize enrollments in the heavily minority schools in Birmingham.

The school board, with four newly elected members, has pledged to make integration issues a high priority, particularly in lower Silver Spring, where foreign and racial minority students now make up the majority of the pupils.

The Harvard-trained Cody is also among several persons being considered for superintendent in Baltimore, where the school board has been embroiled in a controversial search for a replacement for Superintendent John L. Crew.

Cody has said that Montgomery appeals to him because he is ready for new challenges, having accomplished most of his goals in a classic urban school system.

Unlike Birmingham, Montgomery has highly vocal parents who place tough demands on the school system. The county also provides nearly triple the per-pupil budget that was available to Cody in Alabama.

The school board must still negotiate with Cody over salary and fringe benefits. Andrews, a 26-year veteran of the county schools, is paid $74,000. School officials declined to say what salary Cody would be offered.

If he accepts the job, he will take over July 2.