data filtering based on last two digits of large number
I think an Advanced Filter will do what you want easily without copying
thousands of formulas and without increasing the size of the workbook.
You've got 2 ways to go with this method:
1)You can copy the valid records to a new location
or
2)You can delete the invalid records (my preference)
I assumed your data begins in A1
METHOD 1:
F1: TestCrit
F2: =(--RIGHT(A2,2)=53)
Select your data range (mine is A1:D12000)
Data|Filter|Advanced Filter
Check: Copy to another location
List Range: $A$1:$D$12000
Criteria Range: $F$1:$F$2
Copy To: $H1
Click the [OK] butotn
All of the valid records, where the date/time values end in 53, will be
copied to the range beginning with cell H1
METHOD 2:
F1: TestCrit
F2: =(--RIGHT(A2,2)<53)
Select the data range (mine is $A$1:$D$12000)
Data|Filter|Advanced Filter
Check: Filter the list in-place
List Range: $A$1:$D$12000
Criteria Range: $F$1:$F$2
Click the [OK] butotn
Only the values that do not end in 53 will be displayed.
(Check that NO valid rows are displayed)
Select from the first visible record under A1 down through the last visible
record.
Edit|Delete..... (Excel only allows you to delete entire rows when filtering)
(That will delete those rows)
Data|Filter|Show....to display the remaining valid rows
File|Save As...so you don't overwrite the original file.
Does that help?
***********
Regards,
Ron
XL2002, WinXP-Pro
"Margo Guda" wrote:
Here is a snapshot of the first few rows of my dataset, containing at
least one value that was supposed to be filtered out. (see the fourth
row of figures). Some values are indeed filtered out, but many less than
should be.
date/time dir speed gust TEST
date/time dir speed gust TEST
200201010053 50 7 *** 53
200201010153 60 7 ***
200201010253 60 10 ***
200201010336 50 9 ***
200201010453 80 7 ***
200201010553 70 9 ***
200201010653 60 9 ***
200201010853 90 18 ***
200201010953 100 17 ***
200201011253 110 15 ***
200201011353 120 13 ***
200201011453 110 15 ***
Bernard Liengme wrote:
In a cell on row 5 enter =--RIGHT(A5,2)
Put a name (TEST) in the top row
Select all the data including the top row with names and filter
|