Stocks have been off to a very bullish start in 2024, and investors seem increasingly optimistic about the overall state of the market and the global economy. Now, that's not to say there aren't still notable macroeconomic challenges that are creating a nuanced operating environment for companies across a range of industries and sectors.

However, excellent businesses with long-term growth stories can stay above the fray. If you have some cash, say $2,500, to invest in stocks, here are two companies you might want to consider putting at least part of that amount toward the next time you add to your buy basket.

1. AbbVie

AbbVie (ABBV -4.58%) has been dealing with a reality that afflicts any successful drugmaker, given enough time, which is the loss of patent exclusivity on a key, lucrative product. In AbbVie's case, that loss of patent exclusivity was for Humira, which was not only its most-sold drug but the top-selling drug in the world at its peak.

While the entry of newer, generic versions to the market is already having a notable impact on AbbVie's immunology portfolio and broader balance sheet, this is an expected, predictable aspect of the pharmaceutical business cycle. It's going to take some time for the ship to right itself now that Humira is no longer packing the punch for AbbVie's balance sheet that it used to. The good news is that the company has plenty of other blockbusters in its portfolio and coming down the pipeline.

Two heavy hitters that come to mind immediately are its highly successful immunology drugs, Skyrizi and Rinvoq. These drugs brought in combined revenue of about $12 billion in 2023 alone -- out of the company's top-line total of $54 billion. Management estimates that these drugs will hit a combined annual revenue total of around $27 billion by the year 2027, which is notably above Humira's highest-ever annual revenue of $21 billion. The company also expects Skyrizi and Rinvoq to bring in a combined full-year revenue of $16 billion in 2024.

AbbVie has other blockbuster products like Botox Cosmetic, Botox Therapeutic, and Vraylar, the latter of which is used to treat various mood disorders. These three products brought in 2023 revenue of $2.7 billion, $3 billion, and $2.8 billion, respectively.

The company also boosted both its neuroscience and oncology pipelines in a stream of recent acquisitions. For example, its acquisition of Immunogen added the ovarian cancer therapy Elahere to the mix, which some analysts think could bring in annual sales of about $1.4 billion before the end of the decade.

While cyclicality impacts every business, including pharmaceutical companies, these are generally more resistant to the high and low tides of economic turbulence compared to companies in other industries. AbbVie has a portfolio of mainstay products and is still very profitable.

Meanwhile, for investors seeking a solid dividend stock, AbbVie yields 3.5% at the time of this writing and has increased its dividend by about 45% over the trailing five-year period. This looks like a solid business to add cash to in 2024 and hold for the long haul.

2. Merck

Merck (MRK 0.37%) is a biopharmaceutical giant with its fingers in sectors ranging from prescription medicines to vaccines to animal health products. If you're just now getting brushed up on this stock, you should know that it's not only one of the largest pharmaceutical companies by revenue but also boasts what is projected to be the world's top-selling drug in 2024 in its portfolio.

That blockbuster drug is its cancer therapy Keytruda, which is on track to bring in as much as $27 billion in revenue in 2024 alone. Patent protection on this drug lasts until 2028. Merck is currently working on building up its sales potential across other core products in anticipation of that event.

The company is also developing a subcutaneous version of Keytruda that would help alleviate worries about that upcoming patent cliff and boost the sales lifespan of this drug for many years into the future. Other drugs that Merck is developing in oncology as well as other key disease areas are on track to help the company add $35 billion in sales to its balance sheet by the mid-2030s.

Merck has had a habit of growing through research and development as well as acquisitions. For example, Merck purchased Prometheus Biosciences last year for just shy of $11 billion, a move that added a novel candidate for the treatment of ulcerative colitis, Crohn's disease, and other autoimmune conditions to its pipeline.

In February, the company announced that it would be boosting its animal health division with the purchase of Elanco's aqua business. The move will add supplements, vaccines, manufacturing facilities, water treatment products, medicines, and more to its portfolio to serve clients in fish farming and other related sectors. For example, Merck's animal health division will now own the rights to a DNA-based vaccine that prevents Atlantic salmon from developing pancreatic disease, an ailment that is commonly reported in the farmed salmon industry.

Merck's top and bottom lines have fallen recently, a huge part of which can be attributed to poor year-over-year comparisons from declining sales of its antiviral COVID-19 drug Lagevrio. Full-year sales for all of Merck's products totaled $60 billion in 2023, up 1% year over year, but excluding Lagevrio, they rose 9% from 2022.

Merck also pays a dividend, which yields approximately 2.5% at the time of this writing. Looking back over the trailing five-year period, that dividend has risen to the tune of about 40%. This looks like another solid healthcare business for investors to buy, add to, and hold for the long run.