Believe it or not, having too much cash on hand can cause problems for some parts of the government. Not problems as bad as if there weren't enough cash, but problems nevertheless.

Late last week, the Treasury's cash balances bulled their way to $34.5 billion, double the levels of a month earlier and far more than anyone had expected only a few weeks ago. Back in May, the Treasury balances were running around $7 billion.

The surge in cash is primarily the result of slower-than-predicted federal spending, though revenues are also slightly higher than Treasury had been expecting. Treasury Secretary Donald T. Regan and other administration officials are beaming now that the budget deficit for fiscal 1983, which ends Friday, apparently will turn out to be $10 billion or more below the $210 billion estimated in July.

But based on the earlier estimates, Treasury borrowed $45 billion this quarter. It had planned to increase its cash on hand gradually to about $20 billion this week as part of its normal efforts to spread its borrowing throughout the year. On a quarterly basis, the budget deficit is always much larger in the first and second quarters of a fiscal year than it is in the final quarter. Treasury, therefore, likes a larger cash balance as the year begins each Oct. 1.

The current problem arises from the fact that the terms under which the nation's banks hold the Treasury money limit the total nationwide to about $20 billion. The money is held in tax and loan accounts, into which corporations and other large employers make certain tax payments directly.

Each bank sets its own limit on these funds after it takes into account its need for the funds and the fact that the funds must be backed by the banks' holdings of federal, state, municipal or corporate securities. The banks have free overnight use of the money and, if they choose, can keep it longer by paying the government interest at a variable rate that currently is about 9 percent.

When a bank reaches its tax and loan account limit, any excess is transferred to a Treasury account at the Federal Reserve. At the end of last week, Treasury had $14.4 billion at the Fed, compared with the usual amount of only about $3 billion. It's that extra $11 billion that has caused all the problems now.

According to Federal Reserve definitions, when a corporation writes a check on its account to pay its taxes and a bank credits a Treasury tax and loan account, there is no effect on the level of the nation's money supply or the level of reserves banks must maintain against their demand deposits.

But with the tax and loan accounts generally full, the added inflow of tax payments was shifted to the Fed. That transfer effectively wiped out that money as far as the private economy was concerned and substantially reduced the amount of reserves the banking system had available.

To keep this shift from forcing a contraction in the amount of credit available in the economy, the Fed was forced to move swiftly to add reserves by temporarily buying government securities held by bond dealers and banks. That replaced the lost reserves as the dealers and banks exchanged their securities for cash.

The whole process went so far so fast that the Fed last week sopped up most of the securities readily available in the huge government securities market, one market participant said, and in the process, left financial markets completely confused about what was going on.