-
Extract Text
Good morning,
I have a text field and need to extract out the numbers so I can create a formula to calculate the variance. See example below
Discount: Rate changed from -799,960.00 to -1,031,100.00
The numbers would change each time but the rest of the verbiage would be the same. Any assistance would be greatly appreciated.
Thank you
mtapp
-
Re: Extract Text
As long as you can 100% rely on the text always being in the field at the same relative positions, then you can use the text as anchor points for extracting portions of the string:
formula1
Code:
ToNumber(mid({Command.FIELDA},(instr({Command.FIELDA},"from") + 5),(instr({Command.FIELDA}," to ") -(instr({Command.FIELDA},"from") + 5))))
and formula2
Code:
ToNumber(mid({Command.FIELDA},instr({Command.FIELDA}," to ") + 4))