THE DEPARTMENT OF HOUSING and Urban Development is putting great emphasis on "targeting," or trying to put its money where the greatest problems are. This is one way for HUD, under a budget squeeze, to get more aid to the mayors and urban minorities whom Secretary Patricia Harris has promised so often to help. And it's sound policy - as long as the target-shooting analogy and approach are not pushed too far. The trick is to make federal aid less scattershot without stifling local initiatives. That's hard.

Consider HUD's latest attempt to "target" housing subsidies by reserving chunks of funds for large cities. After proclaiming this a "major policy change," HUD spokesmen have been scrambling to make clear that the formulas for allocating this aid among metropolitan areas, and between each city and its suburbs, are not being changed. What's new is that the cities involved - 23 so far - are getting guarantees that, for a year, their "fair shares" of public-housing and rental-assistance funds can't be diverted to suburban projects. The aim is to spur developers to take on more inner-city work instead of favoring the suburbs, where subsidized projects are often cheaper and sometimes easier to build.

Of course HUD can't guarntee that more central-city housing, especially for big families with low incomes, will suddenly appear. Market forces and the capabilities of local governments will still have the most influence on that. But the new policy should help - as long as HUD's formulas aren't too rigidly imposed. Some cities and suburbs, after all, have thrashed out or are working toward their own "fair share" plans to expand housing opportunities regionwide. The Washington area, through the Council of Governments, has led the nation in this regard. HUD spokesmen say they do intend to keep working with COG, Los Angeles's regional agency and any others that come along. That is essential. Promoting diversity in the suburbs is a very slow polically prickly business. It should be encourage just as much as housing programs in the cities, where most low-and moderate-income people now live.

The value of flexibility has been underscored even more by the current dispute about the uses of community-development grants. During the programs first few years, a lot of money had gone to higher-income areas or been used for projects that did little to help poorer neighborhoods or combat blight. Congress improved the formula last year to direct more aid to struggling cities. Some weeks ago, HUD proposed to narrow the focus even more by requiring that 75 per cent of each community's funds be spent for the direct benefit of lower-income people.

While well-intentioned, this rule is far too strict. As many mayors and others have pointed out, it would undermine many efforts to bolster neighborhoods threatened but not yet overtaken by blight. And it simply does not fit cities whose poorer residents are scattered around town, or whose policies are aimed at dispersing subsidized housing and the related facilities that the block grants are meant to support.

We are not arguing that dispersal of poorer people, within a city or within a region, should be the keystone of urban policy. The point is that no single approach - dispersal, focusing on the most blighted blocks, fostering neighborhoods or whatever - can possibly fit the whole array of situations, political structures and possibilities that American cities display. That is the reason why the Carter administration has had so much trouble trying to define a national "urban strategy." Many of the complexities and contradictions can't be resolved in a useful way by formulas or fiats from Washington. And that's why cities and regions need more flexibility than regulation-writers and advocates of finely tuned federal programs are usually comfortable with. Any program that is too tightly "targeted" is bound to be off target somewhere.