ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   filtering out some data (https://www.excelbanter.com/excel-programming/384460-filtering-out-some-data.html)

Bob Garber

filtering out some data
 
I need to either program a macro in excel 2003 or do an advanced filter. I
need to pull out all the unique 8 digit numbers which follow
"<val:StationID" in my spreadsheet. There are no spaces to contend with and
they will always be 8 digit numbers. I need to put them into a separate
spreadsheet in column A(each unique number to a row). Some of the numbers do
repeat and the character strings they are contained in are very long. This
is an rtf file I opened in Excel.

Any help would be appreciated.

Jay

filtering out some data
 
Hi Bob -

If you need to do this only once, then a calculated column with an advanced
filter should work nicely. Below are some instructions for that approach.
If this doesn't solve your problem, well generate a macro that will. Just
re-post for instructions on that approach.

Step 1. Enter the following formula:
=mid(A2,16,8)
and point it toward your <val:StationID field (the formula above assumes
that your first StationID value is in cell 'A2'). Copy of the formula
downward in a column as far as needed. Enter a field name, e.g.,
"EightDigits", at the top of the formula column.

Step 2. Build an Advanced filter criterion range somewhere on your
worksheet as:
............T U V
1 EightDigits
2 <""

Step 3. Run Data|Filter|Advanced Filter... and make sure to choose "Copy
to another location" and "Unique records only" options.

--
Jay


"Bob Garber" wrote:

I need to either program a macro in excel 2003 or do an advanced filter. I
need to pull out all the unique 8 digit numbers which follow
"<val:StationID" in my spreadsheet. There are no spaces to contend with and
they will always be 8 digit numbers. I need to put them into a separate
spreadsheet in column A(each unique number to a row). Some of the numbers do
repeat and the character strings they are contained in are very long. This
is an rtf file I opened in Excel.

Any help would be appreciated.



All times are GMT +1. The time now is 09:59 AM.

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