ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If statment (https://www.excelbanter.com/excel-worksheet-functions/9045-if-statment.html)

helpdesk genie

If statment
 
Hi folks,
Here is one that made me go hmmmm.
I have to compare two columns of data. One column has 300 cells; the other
has 1200. If value of colum a matches any value of column b then I want the
entire row that contains that data to be deleted. If there are no duplicates
in the two columns I would like them left alone.
Any help that you can offer would be terrific.


helpdesk genie

I have that backwards, it should read: If there are duplicates I want them
left in, if the values are unique then I want the entire row deleted.

"helpdesk genie" wrote:

Hi folks,
Here is one that made me go hmmmm.
I have to compare two columns of data. One column has 300 cells; the other
has 1200. If value of colum a matches any value of column b then I want the
entire row that contains that data to be deleted. If there are no duplicates
in the two columns I would like them left alone.
Any help that you can offer would be terrific.


Dave Peterson

You have data in columns A and B.

And you want to check each cell in column A against the whole column B?

Add some headers to row 1

Then put this in C2 and drag down:
=isnumber(match(a1,b:b,0))

Then apply Data|filter|autofilter to column C.

Show the ones you want to delete (true or false). Select those visible rows and
delete them.



helpdesk genie wrote:

Hi folks,
Here is one that made me go hmmmm.
I have to compare two columns of data. One column has 300 cells; the other
has 1200. If value of colum a matches any value of column b then I want the
entire row that contains that data to be deleted. If there are no duplicates
in the two columns I would like them left alone.
Any help that you can offer would be terrific.


--

Dave Peterson


All times are GMT +1. The time now is 05:02 PM.

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