sName = (Left(range("B1"), 3) & Right(range("B1"), 2))
or better:
Function sName (rngS as range) as string 'or variant
Dim sName As String
sName = (Left(rngS, 3) & Right(rngS, 2))
end Function
Stephen Rasey
Houston
http://excelsig.org
http://wiserways.com
"Jack S" wrote in message
...
I am trying to Extract characters out of a string and
include them in a file name by using
Dim sName As String
sName = (Left(B1, 3) & Right(B1, 2))
But this does not work.
Any ideas as to what is wrong?
Thanks