NEW YORK (CNNMoney.com) -- Investor guru Warren Buffett bought up millions of shares of health care and drugmaker stocks in recent months while shedding energy shares, according to a Friday filing with the Securities and Exchange Commission.

In his biggest acquisition of the second quarter, Buffett's Berkshire Hathaway (BRK.A) investing company added nearly 4 million shares of drug and consumer product maker Johnson & Johnson (JNJ, Fortune 500), bringing his tally to nearly 37 million shares.

Buffett also bought 1.2 million shares of laboratory equipment company Becton Dickinson & Co. (BDX, Fortune 500) He did not hold shares in this company in the second quarter.

The Omaha, Neb.-based investor sold off nearly 7 million shares of energy producer ConocoPhillips (COP, Fortune 500). But he still held more than 56 million shares of the oil company.

He also sold 14.8 million shares of utility operator Constellation Energy (CEG, Fortune 500), which accounted for his entire stake in the company.

In other large sell-offs, Buffett unloaded more than a million shares of each of the following companies: Home Depot (HD, Fortune 500), Wellpoint (WLP, Fortune 500) and United Health Group (UNH, Fortune 500).