Not quite. I surely hope this is not impossible with Crystal. My data looks like the following examples:
1 Methadone 2mg
180 253748 SENNA PLUS TAB
12 Heparin Solution 500ml
The current formula seems to work fine for the rows with only one 'set' of numbers in front. The second example row only strips the 180 but leaves the 253748 along with the alpha portion.
Local NumberVar strLen := Length (inString); Local NumberVar result := -1; Local NumberVar a := 1; While a <= strLen And result = -1 Do While a <= strLen And result = -1 Do ( Local StringVar c := inString [a]; If NOT (c=" " or NumericText (c)) Then result := a; a := a + 1; ); result) )
Absolutely perfect. I added one more condition for 'NOT' to eliminate a decimal on one row. It seems to have covered all the conditions! I really appreciate you helping me out.
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