Jens,

You missed an important piece of information. Taking a small part of Glenn's example:
Code:
1030,fred@hotmail.com
1030,john@hotmail.com
1030,



You code will incorrectly report "1030" as having no email addresses where in fact it has two.

You also have a typo

Maciep's code it the way I would have approached it, and should do the job.