ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Redundant data (https://www.excelbanter.com/excel-discussion-misc-queries/142655-redundant-data.html)

ale

Redundant data
 
Hi!

I need to remove redundant/common data from two different column.
For example, I have columns A and B as follows:

A B
1 7
3 9
4 3
7 1
8

and I'd like to have two more columns, like C and D, containing:

C D
4 9
8

How is it possible to do that?

Thanks a lot,

ale


AKphidelt

Redundant data
 
How good are you with VBA?

Otherwise the only way you can do it is if you allow blank/error cells...
although it is easy to create a macro that matches the values then deletes
the ones that don't match.

For Example, in Cell C1
=IF(ISERROR(MATCH(A1,$B$1:$B$4,0)),A1)
In Cell D1
=IF(ISERROR(MATCH(B1,$A$1:$A$5,0)),B1)

What this well give you is the values that match well show up as errors.
Then you can highlight the columns, press CTRL + G and then select Formulas
and check the Errors box. Then right click on one of the error cells and
click delete and have the cells shift up. If you do this quite often, I can
write a Macro/VBA for you to loop through and automatically do it for you.

"ale" wrote:

Hi!

I need to remove redundant/common data from two different column.
For example, I have columns A and B as follows:

A B
1 7
3 9
4 3
7 1
8

and I'd like to have two more columns, like C and D, containing:

C D
4 9
8

How is it possible to do that?

Thanks a lot,

ale



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

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