British officials are fretting over what they view as an alarming drop in interest by U.S. companies in investing in the United Kingdom.

One barometer, the number of U.S. companies visiting Britain to study business prospects, fell 40 percent last year, with just 90 company visits in 1987 against 150 the previous year, said Christopher Priston, head of the government's Invest in Britain Bureau.In addition, the bureau's annual report, to be released this week, says the number of U.S. investment projects in Britain fell 19 percent last year to total 133. It also said that existing U.S. operations in Britain accounted for a greater share of the money that was spent, 60 percent of the total U.S. investment, vs. 44 percent in 1986.

U.S. companies still are committing themselves to Britain, and several of them announced ventures in the past few weeks. But British officials say the drops in commitments might signal a contraction in future investment.

Now there is a new type of footloose investor in Europe who will move to wherever is the most cost-effective place to manufacture, Mr. Priston said.

U.S. business leaders and executives of investment agencies from other countries confirmed the waning interest in Britain. They said Americans are more attracted these days to the idea of spending their devalued dollars at home, and when they do look abroad they have plenty of enticing choices besides the United Kingdom.

Executives for several U.S. companies also suggested they weren't investing much in Britain these days because they already have substantial operations there. Ninety-six of the top Fortune 100 companies have facilities in Britain.

The perceived drop in U.S. investment concerns Britons because U.S. corporations played a key role in their country's past economic development and figure in its hopes for the future.

Between 1982 and 1984, the United States accounted for almost 70 percent of total foreign investment in Britain, outside of oil, banking and insurance. In contrast, U.S. investment accounted for only 15.5 percent of the same types of investment in European Community countries and 1.2 percent of the investment in Japan.

Figures for 1987 U.S. investments abroad will be released in August, but officials on both sides of the Atlantic expect they will show a decrease in American spending in Britain.

Dick Doyle, a spokesman for the Irish Industrial Development Authority in Dublin, Ireland, said in a telephone interview that his group estimates U.S. investment in manufacturing across Europe has declined by 20 percent over the last three years.

The only mobile investment that is increasing in Western Europe is from the Far East, mainly from Japan and South Korea, Mr. Doyle said.

At the end of 1985, Britain valued U.S. investment in the United Kingdom at $34 billion.The U.S. Commerce Department says American firms, again excluding the oil, banking and insurance sectors, invested another $16.86 billion in Britain during 1986.

Bill McReynolds, director of monetary and financial affairs at the U.S. Chamber of Commerce in Washington, said it makes more sense today to invest at home.

Britain's economy should grow, but the United States will do better, he said by telephone. The rate of return on capital in the United States is much greater and business conditions in general are much better here than in other countries.

Mr. Priston agreed the weakness of the dollar was holding up spending

plans. He added that uncertainty over the outcome of the presidential elections was also deterring would-be investors - a notion that wasn't seconded by anyone else.

The majority of expenditure decisions made by U.S. companies last year represented expansion projects by companies already in Britain rather than new projects, according to the Invest in Britain Bureau, a unit of the Department of Trade and Industry.

There has been only one major disinvestment by a U.S. company from Britain in recent years. That occurred when Caterpillar Inc. of Peoria, Ill., trimmed operations worldwide.

More often, U.S. companies are deciding against investing in the United States, partly to expand enterprises in other countries and partly because they find better deals elsewhere.

For example, eight software companies from the U.S. West Coast all recently announced plans to build facilities in Ireland. The companies include Microsoft Corp. of Redmond, Wash., which will invest $2.9 million to establish a software development center in Dublin.

Frank Kundahl, sales and marketing vice president of Maltool & Engineering Inc., a manufacturer of jet engine parts, said that when his company decided to build a plant it picked Roanne, France.

We have two factories in England already, he said. We decided to have another plant in Roanne to better serve our French-based customers. Maltool is a unit of Santa Monica, Calif.-based Wickes Cos. Inc., a diversified manufacturing concern.

Mr. Kundahl said Roanne, which is west of Lyon, is ideal because of the very pleasant surroundings and enthusiastic work force.

When Intergraph Corp., a designer and maker of computer graphics systems in Hensfield, Ala., decided to build its first foreign plant, it chose a high- technology area in Nijmegen, the Netherlands.

A small number of international high-tech companies are already there, like Philips (the Dutch electronics giant), said a spokesman for Intergraph. The Dutch rail system is good, and they have an excellent communications system. The Dutch workforce also speaks English.

The Intergraph unit in Nijmegen, just an hour's drive from Amsterdam, started operations in December 1986.

The slowdown in U.S. investment did not get much publicity until an inter- union squabble caught Britons' attention.

Ford Motor Co. of Dearborn, Mich., had planned to build a $75 million components plant in a depressed part of Scotland. But in March it gave up those plans, saying the unions involved would not let it negotiate a single agreement with them.

The news about Ford especially depressed development officers from regions that have been counting on U.S. help.

The West Midlands Industrial Development Association, which represents an area of 40,000 square miles in the middle of England, has gone all out to seek overseas investment.

During the late 1970s and early 1980s, the West Midlands lost 40 percent of its manufacturing jobs. That was the highest rate of job decline ever recorded in the western world.