The following code is part of a macro which I use to check a list of entries against a list of known staff. If the name being checked in the code does not appear in the list, the user is notified and the name is added to the list. The lookup function always returns a value from the column it references, so the code checks to see whether the returned value is equal to the name it is checking for. However, the first entry on the staff list begins with "Ash", and when the code is looking for a value beginning with "Adb", the lookup function will try to return a name before the entry beginning with "Ash". Since there is no value before "Ash", it returns an error. As a temporary solution, I have added someone named "Aardvark" to the beginning of the staff list, but I would prefer to have a more elegant soltion.
Thanks.
Bookmarks