Ecolab met Wall Street’s profit expectations for the third quarter despite weak oil markets, troublesome currency exchanges and a 2 percent dip in sales and adjusted profits.

Excluding a $142 million charge taken in 2015 to deal with a Venezuelan currency crisis, adjusted profits for the quarter fell 2 percent to $378 million or $1.28 per share, in line with Wall Street expectations, Ecolab reported Tuesday. (Including last year’s special charge, third-quarter 2016 net income soared 45 percent to $374 million).

Sales fell 2 percent to $3.386 billion, which was below the $3.49 billion analysts had expected.

Still, company executives praised results, noting that the long-troubled oil markets appeared to be bottoming out and could return to more normal conditions next year.

The St. Paul-based company saw energy-related sales sink 8 percent during the quarter. At the same time, chemical sales aimed at food, beverage, health care and pest control customers proved strong.

Those division sales upticks paired with tight cost controls to produce “solid earnings growth,” said CEO Doug Baker in a statement.

Ecolab’s institutional, industrial and “other segments” divisions led results and outpaced lackluster global markets, he said. “These more than offset a moderated decline in our energy segment.”

Baker conceded that “currency translation remained a significant headwind in the quarter,” reducing operating profits by 7 percentage points. Still he noted that currency exchange headwinds have lessened.

“In this mixed environment, we expect our institutional, industrial and other segments will show modestly better fixed currency growth in the fourth quarter,” Baker said. He added that he expects the energy business to see a “gradual recovery in 2017.”

Ecolab’s stock fell 1.8 percent, or $2.03, to $112.14 on Tuesday.

CFRA Research equity analyst Christopher Muir lowered his stock price target for the company, but maintained his “hold” rating on the stock Tuesday.

For the quarter, “weak energy segment earnings and lower currency tailwinds were offset by stronger earnings in other segments,” he said. “We see energy sales remaining challenging, but see other segments performing well in 2017.”

Ecolab narrowed its guidance for full year 2016.

Officials now expect earnings of $4.35 to $4.45 per share, down from the prior forecast of $4.35 to $4.50 per share.