New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

Macro extracts numbers from a text string

Macros, VBA, Excel Automation, etc.

Macro extracts numbers from a text string

Postby chinleongong » Fri Jan 15, 2016 9:26 pm

I need to convert commentaries in excel on financial data from dollars to euros. Rather than manually calculating and converting the numbers and changing the $ sign to €, can I write a macro that extracts numbers from a text string, multiply the numbers by an exchange rate and replace the calculated numbers back to text string? For example: Assuming an exchange rate of 1.48, I would like to change "The variance is made up of project A (+$100m), project B (-$75m) and project C (+$25m)." to "The variance is made up of project A (+€67.6m), project B (-€47.3m) and project C (+€16.9m).”

Thanks in advance for your help.
  • 0

chinleongong
Rookie
 
Posts: 1
Joined: Jan 15, 2016
Reputation: 0
Excel Version: 2010

Return to Macros and VBA Questions

Who is online

Users browsing this forum: No registered users and 152 guests