Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

User Image
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!
May 3, 2024  • #1
Thomas Malloch (BFS)'s profile on WallpaperFusion.com
I put together a macro that should work for you. Here's how to get it into ClipboardFusion:

  • Download the file attached to this post
  • Open the ClipboardFusion Settings window
  • On the "Macros" tab, click the "Import" button
  • Select the file you downloaded in the first step
  • In the window that pops up, you can review the code and assign the Macro a HotKey
  • Click OK to close the Macro Edit window, then OK again to save and apply your changes
• Attachment: Strip First Number from Text.cfmacro [11,896 bytes]
May 6, 2024  • #2
User Image
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.
May 7, 2024  • #3
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)