June was another good month for stocks as generally positive economic data, falling inflation, and the Federal Reserve's decision to pause interest-rate increases all helped boost investor confidence and persuaded investors that a recession might be avoided.

The Dow Jones Industrial Average finished the month up 4.6%, though it was still the worst-performing of the three major indexes, in part because the Dow has less exposure to the tech sector, which has boomed this year. 

^DJI Chart

^DJI data by YCharts

Still, not every Dow stock was a winner. Let's look at the three worst performers on the blue-chip index to see if any of them are worth buying.

1. Walgreens Boots Alliance (down 6.2%)

Walgreens Boots Alliance (WBA 0.57%) has been struggling for years as its efforts to grow through acquisitions and expand into healthcare services have mostly failed to deliver the hoped-for results. The company is also still lapping the boom in COVID-19 tests and vaccines, making comparisons difficult.

Last month, the stock was flagging after the company cut its full-year guidance following the third-quarter earnings report and said bottom-line growth in fiscal 2024 will be modest as well.

In the report, U.S. retail comparable sales were essentially flat, falling 0.2%, while retail comps at its Boots UK stores were up 13.4%. Overall revenue rose 8.6% to $35.42 billion with the help of acquisitions, which beat revenue at $34.25 billion. On the bottom line, adjusted earnings per share rose just 3% to $1.00, missing estimates at $1.07.

The company also cut its EPS forecast from a range of $4.45-$4.65 to a new range of $4.00-$4.05 because of weakness among consumers, lower COVID-19 contributions, and macroeconomic cautiousness. In 2024, it called for low- to mid-single-digit adjusted operating income growth, which it said would outpace adjusted EPS growth.

Walgreens also closed on its acquisition of CareCentrix, a home-based healthcare provider, in the quarter. 

While Walgreens might look cheap after the sell-off and it offers a dividend yield of 6.6%, the company's strategy to pivot to healthcare has yet to pay off. Acquisitions often fail, and investors should wait for a clearer sign of a turnaround before they buy the stock.

2. Salesforce (down 5.4%)

During a month when tech stocks generally moved higher, Salesforce (CRM 0.42%) was moving in the opposite direction after Wall Street blew off the company's first-quarter earnings report, even as it topped the analyst consensus and raised its earnings guidance for the full year.

Revenue in the first quarter rose 11% to $8.25 billion, which topped estimates at $8.18 billion. Adjusted earnings per share of $1.69 were up from $0.98 in the quarter a year ago and ahead of the consensus at $1.61.

The company has been focused on cost-cutting after a round of layoffs and a move to shrink its real estate footprint. Looking ahead, the company maintained its full-year guidance of $34.5 billion to $34.7 billion, representing 10% growth, and raised its full-year adjusted EPS guidance to a range of $7.41 to $7.43.

Later in the month, the company held an "AI Day," announcing an artificial-intelligence cloud with a suite of tools that provide generative AI experiences across a range of applications. The event sparked some positive analyst chatter on the stock.

Though Salesforce's revenue growth has slowed to an all-time low, the company is committed to controlling costs and improving margins. Much of the tech sector has seen top-line growth slow, and if Salesforce can reaccelerate its growth rate, the stock should be a winner from here.

3. UnitedHealth Group (down 1.4%)

Finally, UnitedHealth Group (UNH 0.30%), the nation's most valuable healthcare company, underperformed last month after it warned about rising costs resulting from an increase in elective surgeries among older adults.

After delaying those surgeries during the pandemic, there's now high demand for them, which is likely to weigh on the company's bottom line. As a result, UnitedHealth said its medical loss ratio, or the percentage of premiums it spends on claims, will top its full-year range of 82.1%-83.1%.

During the pandemic, insurers like UnitedHealth largely got a bump from the deal in surgeries, seeing profits rise.

Though UnitedHealth is best known as an insurance company, it's a diversified healthcare company that also owns Optum Care, a provider of healthcare services. UnitedHealth has also been a top performer on the stock market throughout its history, and spending on healthcare is only likely to accelerate as baby boomers age into retirement.

At a price-to-earnings ratio of roughly 22, the stock is priced in line with the S&P 500 and operates in a recession-proof industry. Given its track record and competitive strengths, investors should consider taking advantage of any dip-buying opportunities.