Extract an amount

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Extract an amount Thu Oct 14, 2021 7:26 am • by IanF
Hi,

I am struggling with how to extract an amount from a statement. The issue is the amount is written in a format that changes slightly depending upon whether it is under 1,000 or over. So the format is xxx.xx USD or x,xxx.xx USD, or xx,xxx.xx USD etc. If I create a custom text, naming it "Amount" 123,123.123 USD for Contents contain match this works, and I can use this to name the document, but this fails when the amount is under 1,000 USD, as there is no comma in the amount.

Is there a better way, or do I have to create duplicate rules for < 1,000, then up to 99,999 etc?

Thanks
IanF
 
Posts: 3
Joined: Wed Mar 14, 2012 10:18 pm

Re: Extract an amount Thu Oct 14, 2021 10:06 am • by Mr_Noodle
You can use nested conditions set to match if "any" match to keep them all under one rule. Still not ideal but at the moment there's no detection of numbers with thousands separators.
Mr_Noodle
Site Admin
 
Posts: 11195
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Extract an amount Sat Oct 16, 2021 9:30 am • by SpinalTap
IanF wrote:Hi,

I am struggling with how to extract an amount from a statement. The issue is the amount is written in a format that changes slightly depending upon whether it is under 1,000 or over. So the format is xxx.xx USD or x,xxx.xx USD, or xx,xxx.xx USD etc. If I create a custom text, naming it "Amount" 123,123.123 USD for Contents contain match this works, and I can use this to name the document, but this fails when the amount is under 1,000 USD, as there is no comma in the amount.

Is there a better way, or do I have to create duplicate rules for < 1,000, then up to 99,999 etc?

Thanks


I've had luck using a wildcard (%... . 11) and then testing the Match from beginning setting. So for example, on one of my MasterCard statements I specify the wildcard match as the 4th occurrence from the beginning and it works to extract the Amount Due for that statement.

I use this data and Fantastical to create a calendar reminder with the date and amount due.
SpinalTap
 
Posts: 42
Joined: Tue Apr 11, 2017 7:12 pm


Return to Support