filtering out some data

G

Guest

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.
 
G

Guest

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.
 

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

Similar Threads


Top