Duh! make that: put origVariable into newVariable repeat for (the number of lines of origVariable - numberOfLinesWanted) --In other words x-y delete line random(the number of lines of newVariable) OF NEWVARIABLE end repeat newVariable should now contain y lines You should be able to slam this into a function with newVariable being the return value Jim Lambert