The Northeast and the Midwest won a regional battle against the West and the South yesterday in a fight over the distribution of funds in a three-year, $14.5 billion bill reauthorizing the nation's housing and community development programs.

Because the Northest and the Midwest are losing population to Sun Belt states, the current formula, which is based on population, overcrowding and poverty, would have favored Southern and Western cities and states in getting the community development money aimed at eliminating slums and blight.

To prevent that, the House Banking Committee came up with an additional formula that also would take into account the age of housing and a city's growth lag.

The play would allow a city or urban country to choose whichever formula provides more money, and to make sure that the new formula would not force the South and the West to lose money, the committee added about $1 billion in funding for the community development program over the three fiscal years. About 94 per cent of the new funding would go to the Northeast and the Midwest.

However, Rep. Mark W. Hannaford (D-Calif.) offered an amendment on the House floor that would have knocked out the new alternative formula while keeping the additional funds.

Hannaford contended that the new formula was "heavily biased against the West, South and the suburbs."

Hannaford's amendment was defeated 261 to 149, largely because, as Rep. Les AuCoin (D-Ore) pointed out, "No one is hurt."

But Rep. Richard Kelly (R-Fla.) said the "purpose is to continue the preference the cities in the Northeast enjoyed at the outset of this program in 1974. "Why should we vote to give a preference to one area to gain jobs we need in our district? Cities have a right to compete. The federal government ought not to get in the middle of the struggle to take money from one area and give it to another. The South, Plains states and West have go to say, "Thanks but no thanks."

The 1974 housing bill was the first to consolidate several categorical programs into one block-grant program designed to give local governments more flexibility in dealing with urban problems.It contained "hold harmless" provisions to ensure they would not receive significantly less money under the new block-grant formula.

Now the provisions are being phased out, so that Bosotm, for instance which gets $29 million under fiscal '77 funding, would drop to $13.9 million by fiscal 1980 without the additional formula. However, with the new formula accounting for age of housing , Boston would get $27 million in fiscal 1980.

New York would get about $225 million in fiscal 1978, or about $75 million above its 1977 level, and cities such as St. Louis, Chicago, Detroit and Cleveland would about double their funds.

The House will continue floor action on the bill today.

Meanwhile, the Senate Banking Committee reported out is version of the housing bill yesterday. The bill is similar to the Houses, but under another formula twist, Northeast and Midwest cities would get even more money.

The Senate formula, called "impaction," would give more money to cities that have a greater concentration or proportion of older, pre-1939 housing.