ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Removing rows in which 1 cell's value appears on a separate list (https://www.excelbanter.com/excel-discussion-misc-queries/128435-removing-rows-1-cells-value-appears-separate-list.html)

creativeops

Removing rows in which 1 cell's value appears on a separate list
 
I have a table about 20 columns wide and a few hundred rows. One column has
a 4 letter code (which there are about 100 unique values for). There are
lots of duplicates, but I'm not concerned about those. What I want to do is
remove (or even just highlight) rows where that the 4-letter code is one that
shows up on a separate list of about 20 such codes.
Thanks!

T. Valko

Removing rows in which 1 cell's value appears on a separate list
 
One way:

Use another column and test for matches of the codes:

Suppose the data is in A1:E10

The codes are in column A

H1:H5 contain the codes to match against.

Enter this formula in F1 and copy down to F10:

=--ISNUMBER(MATCH(A1,H$1:H$5,0))

This will return either a 0 for no match or a 1 for a match.

Now, sort the range A1:F1 ascending on column F. This will place all the
rows with matches at the bottom of the table.

Now, just delete all the rows at the bottom of the table that have a 1 in
column F. ***** make sure there is no other data on those rows that you
don't want deleted!!!!!!!!

Then you can also delete the formulas from column F (or even delete the
entire column altogether).

Biff

"creativeops" wrote in message
...
I have a table about 20 columns wide and a few hundred rows. One column
has
a 4 letter code (which there are about 100 unique values for). There are
lots of duplicates, but I'm not concerned about those. What I want to do
is
remove (or even just highlight) rows where that the 4-letter code is one
that
shows up on a separate list of about 20 such codes.
Thanks!




creativeops

Removing rows in which 1 cell's value appears on a separate li
 
Cool! that's great. i knew there was a simpler way to do it than what I had
worked out.
Thank you


"T. Valko" wrote:

One way:

Use another column and test for matches of the codes:

Suppose the data is in A1:E10

The codes are in column A

H1:H5 contain the codes to match against.

Enter this formula in F1 and copy down to F10:

=--ISNUMBER(MATCH(A1,H$1:H$5,0))

This will return either a 0 for no match or a 1 for a match.

Now, sort the range A1:F1 ascending on column F. This will place all the
rows with matches at the bottom of the table.

Now, just delete all the rows at the bottom of the table that have a 1 in
column F. ***** make sure there is no other data on those rows that you
don't want deleted!!!!!!!!

Then you can also delete the formulas from column F (or even delete the
entire column altogether).

Biff

"creativeops" wrote in message
...
I have a table about 20 columns wide and a few hundred rows. One column
has
a 4 letter code (which there are about 100 unique values for). There are
lots of duplicates, but I'm not concerned about those. What I want to do
is
remove (or even just highlight) rows where that the 4-letter code is one
that
shows up on a separate list of about 20 such codes.
Thanks!





T. Valko

Removing rows in which 1 cell's value appears on a separate li
 
You're welcome. Thanks for the feedback!

Biff

"creativeops" wrote in message
...
Cool! that's great. i knew there was a simpler way to do it than what I
had
worked out.
Thank you


"T. Valko" wrote:

One way:

Use another column and test for matches of the codes:

Suppose the data is in A1:E10

The codes are in column A

H1:H5 contain the codes to match against.

Enter this formula in F1 and copy down to F10:

=--ISNUMBER(MATCH(A1,H$1:H$5,0))

This will return either a 0 for no match or a 1 for a match.

Now, sort the range A1:F1 ascending on column F. This will place all the
rows with matches at the bottom of the table.

Now, just delete all the rows at the bottom of the table that have a 1 in
column F. ***** make sure there is no other data on those rows that you
don't want deleted!!!!!!!!

Then you can also delete the formulas from column F (or even delete the
entire column altogether).

Biff

"creativeops" wrote in message
...
I have a table about 20 columns wide and a few hundred rows. One column
has
a 4 letter code (which there are about 100 unique values for). There
are
lots of duplicates, but I'm not concerned about those. What I want to
do
is
remove (or even just highlight) rows where that the 4-letter code is
one
that
shows up on a separate list of about 20 such codes.
Thanks!








All times are GMT +1. The time now is 06:45 AM.

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