Or... Use sort with a special sorting function and then get the first line. sort lines of myList ascending numeric by abs((item 1 of each)-n) get line 1 of myList (I'm assuming item 1 is the number and other items are the data you need to go with the number.) I don't know if this would be faster than the brute-force loop. Dar Scott