Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculation of a field that includes text 1

Status
Not open for further replies.

GCCkjn

Technical User
Dec 5, 2007
27
CA
I have Crystal version 9

I am trying to calculate amount of injections, however, the entries for these injections include text as indicated by these examples:

50R - means 50 units on right
100B - means 100 units bilaterally
75L - means 75 units on left

the text is always the last digit. For R and L, the calculation would not be so hard but for B (bilaterally), the amount needs to be doubled. The 'tonumber' formula does not work on this field. Any suggestions would be much appreciated
 
Try a formula like:

if right({table.field},1) = "B" then
val({table.field})*2 else
val({table.field})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top