Energy had a great day on Tuesday. Health care wasn't so lucky. 

The rally in one industry combined with the selloff in the other to cancel out any big moves for broader markets, holding benchmark indexes in a narrow mix through the close. The S&P 500 was up 0.19%, the Nasdaq slid 0.15%, and the Dow Jones Industrial Average was little changed.

BP (BP) - Get Report led gains in the energy sector after adjusted quarterly earnings handily beat expectations. The British energy company reported profit of $532 million, far better than a forecast loss of $140 million. A challenging commodities market continued to hurt BP, though, with overall earnings tumbling 79% from a year earlier.

A surge in crude oil prices propelled the rest of the sector higher. Crude recovered from a selloff to begin the week, closing at a level above $44. Trading has been choppy in recent weeks as hopes spiked then faded over whether the Organization of Petroleum Exporting Countries could agree on a production cap. West Texas Intermediate crude oil was up 3.3% to $44.04 a barrel on Tuesday.

Other energy companies including Royal Dutch Shell (RDS.A) , Chevron (CVX) - Get Report , Total (TOT) - Get Report and ChinaPetroleum & Chemical (SNP) - Get Report were higher, while the Energy Select Sector SPDR ETF (XLE) - Get Report added 1.6%.

The health-care sector was Tuesday's worst performer after drugmaker Eli Lilly (LLY) - Get Report cut full-year profit estimates. The company reduced its earnings forecast to no higher than $2.78 a share, down from a previous low-end target of $2.83. Eli Lilly blamed the Venezuelan financial crisis and a $203.9 million charge tied to challenging conditions in the region.

Small-cap drugmaker Sarepta Pharmaceuticals (SRPT) - Get Report tumbled 26% after a Food and Drug Administration advisory committee voted against approval of a key muscular dystrophy drug. The FDA will review the drug on May 26, considering the committee's advice.

Other health care stocks including Novo Nordisk (NVO) - Get Report , Amgen (AMGN) - Get Report , Sanofi (SNY) - Get Report and Celgene (CELG) - Get Report were lower, while the Health Care Select Sector SPDR ETF (XLV) - Get Report slid 0.38%.

The U.S. Federal Reserve's Federal Open Market Committee began a two-day meeting on Tuesday, which will end with an announcement on benchmark interest rates Wednesday afternoon. While the chances of an interest rate hike are slim, investors will be keen to gauge how willing members are to move at the next meeting in June.

The number of orders for long-lasting manufactured products in the U.S. rose just 0.8%, the Commerce Department reported on Tuesday. Analysts had predicted a 1.8% increase after the measure fell 3.1% in February. Demand for autos, PCs and electrical goods slipped last month.

"This was a very disappointing report, and the soft performance in orders activity along with the downward revisions to the prior estimates suggests that the struggles in this segment of the economy are continuing," said Millan Mulraine, deputy chief U.S. macro strategist at TD Securities.

Home prices continued to rise, though at a slightly slower pace than expected. The S&P/Case-Shiller 20-city home price index rose 0.7% month on month in February, below expectations for a 0.9% increase. All 20 cities reported price increases for the fifth month in a row.

Consumer sentiment worsened in April as economic expectations grew more pessimistic. The Conference Board consumer confidence index fell to 94.2 in April from 96.1. Analysts had expected a slower decline to 95.8. Sentiment on current business conditions fell, and the number of consumers planning to buy big-ticket items such as cars or homes in the next six months also declined.