Loop Thru Values in a Column
How about:
Sub ordinate()
Set r = Range("AJ:AJ")
Set r2 = Sheets("Sheet2").Range("A1")
LastRow = Cells(Cells.Rows.Count, "AJ").End(xlUp).Row
For i = 1 To LastRow
v = Cells(i, "AJ").Value
If v = "D" Or v = "Q" Then
r2.Value = Cells(i, "A").Value
End If
Next
End Sub
--
Gary's Student
gsnu200705
"Robert" wrote:
I need to loop thru values in a secific column such as 'AJ'. When I find a
'D', or a 'Q', I want to put the name of the perosn in column A into another
spreadsheet. I find examples of summing values in a column but not locating
cerain values.
Thanks for assistance...
--
Robert Hill
|