Chris Wood Posted January 31, 2001 Posted January 31, 2001 I have a field 'power' which has to be a number for sorting purposes. In almost every record this field contains a single 2 or 3 digit number. Sometimes it contains two number like '93 / 125'. How can I define a calculation field that just captures the left number. Using NumToText and LeftWords does not seem to work. Any thoughts? Help much appreciated. Chris
LiveOak Posted January 31, 2001 Posted January 31, 2001 Result (calculation, number) = TextToNumber(Trim(Left(Field, Position(Field,"/", 1, 1)))) -bd
Chris Wood Posted January 31, 2001 Author Posted January 31, 2001 Looks good. I will give it a go. Many thanks Chris
Chris Wood Posted February 1, 2001 Author Posted February 1, 2001 Liveoak, Yes it works, but is better with a -1 as follows: TextToNumber(Trim(Left(Field, Position(Field,"/", 1, 1)-1))). What I was really looking for was a similar answer but starting with a number field. But my conclusion is that I must create a duplicate field of my 'power' but as text and then apply your calculation. Anyway many thanks. Chris
LiveOak Posted February 2, 2001 Posted February 2, 2001 Oops! Chris is correct. You want everything up to the position before the "/". -bd
Recommended Posts
This topic is 8966 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now