Sonny Salas
5 discussion posts
Hello everyone! I often inputting only a number in a spreadsheet and it would be quicker if there is a faeture or macro perhaps, wondering if anyone would help creating it? Been searching in the available Macro in the ClipboardFusion but didn't find it yet.
Example : The text is "Purchasing on USD 950.54" and I want to copy only the number, ignoring the text to "950.54"
Thank you in advance!
C# Clouseau
87 discussion posts
A good job Thomas. For use in countries where they use a comma as a decimal separator, you could add some text in the macro. The user has to change the dot in the middle (.\d+)?") of this line into a comma:
return Regex.Match(text, @"(\d+)(.\d+)?").ToString();
Even better would be a string variable at the top of the macro that can be set to "." or ",", but I do not know how to get the value of the string variable into the Regex-line.