Yes, you are right. My suggestion doesn't work if a word appears more than once in a line since only lines which contain the word are counted. Sorry for the confusion. -- Best regards, Jörg-Volker.