How to loop through cells in a column?
hi
this should work. you were a little foggy about what action you wanted to
perform so i just colored the cell.
Sub findit()
Dim lc As Long
lc = Cells(Rows.Count, "L").End(xlUp).Row
For Each cell In Range("L1:L" & lc)
If Len(cell) 255 Then
cell.Interior.ColorIndex = 3
End If
Next cell
End Sub
regards
FSt1
"Judy Ward" wrote:
My goal is to find a row of data that has more than 255 characters in column L.
This works for one cell:
x = Len(Range("L2"))
Can someone help me with looping through cells L2, L3, L4 and so on--keeping
in mind that I need to use the Len function--so that I can perform an action
when I find a row that meets the criteria.
Thank you,
Judy
|