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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picking apart numbers 1

Status
Not open for further replies.

Estandridge

IS-IT--Management
Jul 27, 2004
14
US
I have a report to do that requires me to seperate certain parts of a number and then sort the records by that number. How can I do this?

Example:

523-4353-10
894-4123-00

I need to seperate the first part from the last part. The numbers I need are the two at the end. Is this possible? Thanks!

Eric
 
This formula will work if the scheme is consistent (i.e. ##-##-##):

Val(Split({Table.Field},"-")[3])

-dave
 
Hiya

If the numbers are always in this format then you could set up a formula as such

right({Table1.Field1}, 2)

where Table1.Field1 is your field with the numbers in it. You should then be able to order on that formula.

Failing taht you could run a formula to split the number using the - as the delimeter, then take the last element of the split array as the value to order on.

HTH

 
Thank you both for your help on this.. :) Going to give that a try and hopefully it will work no problem.. The format is always constant, ####-###-##, so that should work.. I'm still a newbie at this so learning, and I always greatly appreciate any help that's offered..

Thanks again!!
Eric
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top