January 31, 200124 yr 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
January 31, 200124 yr Result (calculation, number) = TextToNumber(Trim(Left(Field, Position(Field,"/", 1, 1)))) -bd
February 1, 200124 yr Author 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
February 2, 200124 yr Oops! Chris is correct. You want everything up to the position before the "/". -bd
Create an account or sign in to comment