HELP! Need to have earliest test record data

L

Lee

Here is a sample file ----> www.progressivetel.com\~radney4\testdata.xls

Based on the EARLIEST date (column A) and End Time (column C), I need
to filter the data based on WIN Number (column E). For example - rows
23,24,25 and 26 all contain the same WIN Number. I only want to see
row 23 since it was the earliest date and time, based on Column E.
Anyone have a way I can do this for the entire worksheet?

Thanks in advance!
Lee
 
J

Joel

I usually sort using two keys. First key the Win Number and secondkey date
(incrementing). then write macro to put X in column IV for the row the has
the eariest date. then use autofilter to get the rows with the x's.

LastRow = Range("E" & Rows.Count).End(xlUp).Row
Rows("1:" & LastRow).Sort _
header:=xlYes, _
key1:=Range("E1"), _
order1:=xlAscending, _
key2:=Range("A1"), _
order2:=xlAscending

For RowCount = 2 To LastRow
If Range("E" & RowCount) <> _
Range("E" & (RowCount - 1)) Then

Range("IV" & RowCount) = "X"
End If
Next RowCount

With Columns("IV:IV")
.AutoFilter
.AutoFilter Field:=1, Criteria1:="X"
End With

Set visibleCell = Cells.SpecialCells(xlCellTypeVisible)
visibleCell.Copy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top