By Josie Cox 

The euro gave up early gains against the dollar Friday, after data showed that U.S. consumer prices rose for the third straight month in April, sending the buck sharply higher.

By midafternoon in Europe, the bloc's single currency was 0.7% lower at around $1.103, having earlier in the session hovered around the $1.12 mark.

The dollar also rose almost 0.5% against Japan's yen and by almost 1% against the British pound.

Early dollar selling Friday had been inspired by recent weaker U.S. data, but by midafternoon almost all of those moves had been reversed.

"Markets are incredibly volatile at the moment and any U.S. data is being watched incredibly closely," said Jane Foley, a senior strategist at Rabobank in London.

Friday's data, she said had "reignited the debate" around a U.S. Federal Reserve interest rate raise this year.

Much of the economic data this week drove many investors to push back expectations for Fed action until next year, Ms. Foley said. "But Friday's figures might encourage some reconsideration."

A strong U.S. economy is likely to encourage the Fed to raise interest rates sooner, which would make the dollar more attractive to yield-hungry investors.

Mirroring the turnaround in currency markets, equities reversed earlier losses Friday and by midafternoon the Stoxx Europe 600 was up 0.2%.

European companies rely heavily on exports and tend to benefit from a weaker euro, especially against the dollar.

That said, Germany's DAX index which includes a particularly high proportion of major exporters, was trading 0.1% lower on the day. Earlier in the session, Germany's Ifo measure of business confidence weakened for the first time in seven months in May, while separate data showed that German domestic demand had propelled the economy in the first quarter of the year.

On Wall Street, the S&P 500 has opened largely unchanged.

Brent crude was around 2% higher on the day around $65.20, while gold was flat at $1,204 per troy ounce.

Later in the day, U.S. Federal Reserve Chairwoman Janet Yellen will address the Greater Providence Chamber of Commerce.

Back in Europe, German Chancellor Angela Merkel said Friday there was still "very, very intensive" work needed to find a solution to Greece's financial woes. Ms. Merkel held talks with Greek Prime Minister Alexis Tsipras and French President François Hollande on the sidelines of a meeting of European Union leaders in Riga, Latvia.

European Commission President Jean-Claude Juncker is expected to meet Mr. Tsipras Friday afternoon.

Write to Josie Cox at josie.cox@wsj.com