Hi M,
If the exclamation character (!) is found, both expressions work for me.
If however, the character is not found, then the exptrssion:
InStr(poz, "!") - 1
equates to -1 which is an invalid in the Left function,
---
Regards,
Norman
"mpele" wrote in
message ...
Why the command
b=Left(poz, InStr(poz, "!") + 1)
is working and
b=Left(poz, InStr(poz, "!") - 1)
doesn't work? It say: Invalid procedure call or argument...
--
mpele
------------------------------------------------------------------------
mpele's Profile:
http://www.excelforum.com/member.php...o&userid=31808
View this thread: http://www.excelforum.com/showthread...hreadid=520041