Hi
try the following
Public Sub Foo()
Dim R As Long
Dim lastrow
lastrow = Activesheet.Cells(Rows.Count,"L").End(xlUp).Row
If lastrow < 4 then exit sub
For R = 4 to lastrow
If cells(R,"L").value = "value" Then
'do your action on cells(R,"L")
End If
Next R
end sub
--
Regards
Frank Kabel
Frankfurt, Germany
I would like to check a value in each cell in column L starting at
row 4 to the last row that contains data and perform an action on
each row that contains a specific value in that cell. How do I find
the last row that contains data and how would I select the rows that
contain the value in the cell I am interested?
---
Message posted from http://www.ExcelForum.com/