ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   HELP! Need to have earliest test record data (https://www.excelbanter.com/excel-discussion-misc-queries/238080-help-need-have-earliest-test-record-data.html)

Lee

HELP! Need to have earliest test record data
 
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

joel

HELP! Need to have earliest test record data
 
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


"Lee" wrote:

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


Herbert Seidenberg

HELP! Need to have earliest test record data
 
Excel 2007 Pivot Table
Earliest date.
No sort, no macro.
http://www.mediafire.com/file/mzt2r2z1yjn/07_27_09.xlsx


All times are GMT +1. The time now is 11:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com