Johnson & Johnson topped third-quarter expectations thanks to growth in pharmaceutical sales, but the health care giant continued to tread cautiously with its outlook due to the strong dollar.

J&J on Tuesday stuck to the midpoint of its 2022 forecast after lowering expectations the previous two quarters due to the impact of currency exchanges. The company now expects adjusted earnings to range between $10.02 and $10.07 per share.

That’s a narrower forecast than the $10-to-$10.10 range the company predicted in July.

For the full year, analysts expect, on average, earnings of $10.07 per share, according to FactSet.

J&J brings in nearly half of its sales from outside the United States. A strong U.S. dollar, which is now worth more than a euro for the first time in 20 years, can affect sales for companies that do a lot of international business.

They have to convert those sales into dollars when they report earnings. The stronger dollar decreases the value of those sales. It also gives foreign products a price edge in the United States.

In the third quarter, J&J’s profit climbed 22% to $4.46 billion. Revenue rose 2% to $23.79 billion, and adjusted earnings totaled $2.55 per share.

Analysts were expecting earnings of $2.48 per share on $23.36 billion in revenue, according to FactSet.

Revenue from the company’s biggest segment, pharmaceutical, climbed 2.6% — or 9% without the impact of foreign exchange — to $13.2 billion. That business was charged by sales of the blood cancer treatment Darzalex, which soared nearly 30% to $2.06 billion.

The company recorded no U.S. sales in the quarter from its one-shot COVID-19 vaccine, which brought in $489 million in revenue from international markets.

J&J’s vaccine was one of three initially authorized by U.S. regulators more than a year ago to protect against COVID-19. But the government has since strictly limited who can receive the shot due to a small risk of rare but serious blood clots.

The company also has had to trash millions of doses of the shots due to manufacturing trouble at a Baltimore factory operated by a contractor.

Shares of New Brunswick, New Jersey company rose 2% before the opening bell.