You may also be wanting something like IF LEFT$(PUNCH$, 1) =="P" THEN to only check the first character.