Hi all
I am trying to achieve that if the text lenth is greater than x do something
So here's what I thoguth should work
Could someone take a look at this code and tell me where I am going wrong?![]()
Sub test2() Dim lr As Integer Dim i As Integer Dim lngLen As Long lngLen = Len(strText) lr = ActiveCell.SpecialCells(xlLastCell).Row For i = 2 To lr With Range("d" & i) If Len(strText) > 6 Then .Value = "abc" End With Next i End Sub
Thanks a lot
FD
Bookmarks