Using LEN in a macro
len is numeric
MyCell = ActiveCell
If ActiveCell.Value < "[Client Receives]" And Len(MyCell) 250 Then
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End If
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Ellen G" wrote in message
...
I have an IF statement in my macro that uses LEN() to test if a cell has
more
than 250 characters. If the cell has more than 250 characters, the IF
steps
take place. Otherwise they don't and the macro continues.
However, the problem I'm encountering is that if the cell has less than 10
characters in it, my test doesn't work and the IF steps take place when
they
shouldn't. Any thoughts? The IF statement is as follows:
MyCell = ActiveCell
If ActiveCell.Value < "[Client Receives]" And Len(MyCell) "250" Then
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
End If
Thanks for your help.
Ellen
|