Start a new topic

Remove Currency Formatting--Dictionary Question

I have an incoming gift amount field that is formatted as currency (i.e. $5.00, or $10.50). I need a dictionary that strips it to just 5.00 or 10.50. It seems very simple to remove the $, but it just isn't working for me this morning.

I need to strip the $ because I'm using API to look for gifts greater than $5 to setup different acknowledgement and letter codes and it gives me an error that the incoming data is in the wrong format.

Hi Barbara,

Since dollar sign is a metacharacter in RegEx you need to escape it with a backslash. Value to match on \$ replacement value blank with RegEx turned on.


Thank you!
As a side note since you are doing this through the API you could remove the dollar sign in code like this

Import.Fields.GetByExcelName("A").Value = Replace(Import.Fields.GetByExcelName("A").Value, "$", "")
Login or Signup to post a comment