Writing macros in excel can be done, but it is annoying, you could just set this up in access, you are making a database, and that is what access is for. But usernames and passwords with a locked screen will get a little convoluted trying to program a search query other than the find function already present.