Joined: 09 Mar 2012
Online Status: Offline
Posts: 46
Topic: Extracting a Numeric Value from a String Posted: 09 Mar 2012 at 11:10am
Hi Guys,
Had a quick question with extracting data from a string in Crystal Reports. I have the following descriptions for some items:
WEATHERMAX 450L
WEATHERMAX 1150L
RT 540 450L TOTE
What I need to do in each case listed above is isolate the numeric number with the "L". So in a perfect world the formula to do this would extract the following in each case:
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
Posted: 12 Mar 2012 at 8:32am
i don't think there is an easy way to do this, but you could try something like formula if table.descriptions = "WEATHERMAX 450L" then mid(table.descriptions,12,3) else if table.descriptions = "WEATHERMAX 1150L" then mid(table.descriptions,12,4) else if table.descriptions = "RT 540 450L TOTE" then mid(table.descriptions,8,3)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum