Hi Mike,
It's very similar to the worksheet function:
myMonth = Left$(Sheets("Sheet1").Range("G3").Value, 3)
You may want to use .Text instead of .Value, depending on what is actually
stored in the cell - the Text property returns the text displayed to the
user, while the Value property returns the actual value of the cell.
--
Regards,
Jake Marx
MS MVP - Excel
www.longhead.com
[please keep replies in the newsgroup - email address unmonitored]
Mike wrote:
I have a variable called "myMonth". I would like this
variable to be set to the first three text characters in
cell "G3".
For instance, if G3 is January, I'd like for myMonth to
equal "Jan"
I know that in Excel, I would have the formula be =left
(D3,3). How do I put this into VB code?
Thanks,
Mike.