Two years ago, Walgreens Boots Alliance (WBA) had lost more than a third of its value as the company struggled to digest the purchase of nearly 2,000 Rite Aid stores, recalls Jim Pearce, editor of Investing Daily's Personal Finance.

At that time, the company was dealing with the fallout from the Brexit vote (the company has significant holdings in Europe). As I noted then, Walgreens’ management team vowed to take aggressive action in dealing with both of those challenges in addition to the constant threat posed by Amazon (AMZN).

Last November, the e-tailing giant introduced Amazon Pharmacy, which offers free delivery to its Amazon Prime members. To put it mildly, the pressure was on.

Yet the share price has gone nowhere over the past two years. The stock has delivered a total return of 7% since then due to its generous dividend payment. That’s better than nothing, but a far cry from the 47% return posted by the SPDR S&P 500 ETF Trust (SPY) over the same interval.

From a shorter-term perspective, WBA has gained 40% since the day Amazon announced its entry into the online pharmaceutical business. Over the same span, SPY is up 15% and AMZN has returned less than 8%. Presumably, if Amazon really is the existential threat to Walgreens that it was feared to be two years ago then those numbers would look quite different.

At the start of this year, the company announced: “Walgreens Boots Alliance Fiscal 2021 First Quarter Results Exceed Expectations.”

At first glance, delivering a per-share loss of $0.36 versus a gain of $0.95 the year prior may not sound impressive. But that’s because the company took a one-time, per-share charge of $1.73 during the quarter related to the sale of its Alliance Healthcare business that masked what was otherwise a solid performance.

For that reason, Wall Street eagerly anticipated Walgreens’ fiscal 2021 Q2 report which was released on March 31. Without another big write-off to distort the results, the company generated per-share earnings of $1.19 during the quarter compared to $1.07 last year driven by a 4.6 increase in sales.

In addition, Walgreens estimates that its Q2 per-share earnings were negatively impacted by 40 to 45 cents due to the coronavirus pandemic.

Walgreens also raised its guidance for the remainder of this fiscal year from “low single-digit growth in adjusted earnings per share” to “mid-to-high single-digit growth in constant currency adjusted EPS from both total and continuing operations.”

In part, that change in outlook has been aided by the pandemic since Walgreens claims it “has administered more than 8 million COVID-19 vaccinations… and has provided some 5 million COVID-19 tests.” The company further said that it “has launched 25 major vaccination hubs at Boots stores” in Europe.

Perhaps the most important long-term development at Walgreens was the ascension of Rosalind Brewer to the CEO’s office on March 15. At the same time, the company is divesting its Alliance Bergen wholesale pharmaceutical division that provides discounted drugs to hospitals and doctors so it can focus on its retail operations in the United States and Europe.

According to Brewer, “I will continue to review closely all our initiatives, strategies and opportunities to capitalize fully on the incredible potential in front of us.” That effort includes beefing up Walgreens’ online presence so that it can better compete with Amazon. To that end, earlier this year Walgreens bought a majority interest in a privately-held software developer.

At the same time, Walgreens will be restructuring its in-store retail locations to facilitate the same-day pick-up of online orders. The company noted that “more than 4 million orders have been completed since the launch of Walgreens same-day pick-up” and that online sales for its Boots UK division doubled during the most recent quarter.

In hindsight, it is clear that Walgreens overextended its financial and operational resources as it fought wars on multiple fronts. However, it now appears the company has right-sized the scope of its operations and is focusing on the correct initiatives to drive future growth.

It still has a lot of work to do to justify its inclusion in the Dow Jones Industrial Average three years ago but it is still a bargain at 12 times forward earnings so I am raising the buy limit for Walgreens Boots Alliance to $62.

Subscribe to Investing Daily's Personal Finance here…