PDA

View Full Version : 2 different lists



wilg19
01-09-2020, 03:29 PM
Hi there. I have 2 lists of data that I need to compare for likeness or diff.


Column A has a list that column C's list has some same values and maybe some diff values.

I need to align a new list column F to show the values that are the same as well as add the values that may be diff from each list but keep in the same order as they appear.

Column A
Duck
Goose
Zebra
Giraffe

Column C
Duck
Goose
Deer
Antalope
Giraffe

Column F
Duck
Goose
Deer
Antalopee
Giraffe

Hope this helps. Thanks.

SamT
01-09-2020, 07:31 PM
Why antelope and deer but not zebra?

Leith Ross
01-09-2020, 07:40 PM
Hello wilg19,

Based on your logic of column "F" having items from columns "A" and "C" that match or items in "C" that are not in "A", your result will be column "F" is a copy of column "C".
These can be expressed as (A AND C) OR (C AND NOT A). Any variable ORed with it's complement will always be true. Taking A out of the equation leaves only C.

wilg19
01-12-2020, 05:36 AM
I miss keyd and Zebra should have been included.

If I may expand on my needs as maybe I didnt quite explain properly.

I need to align a new list column F to show the values that are the same as well as add the values that may be diff from each list but keep in the same order as they appear.

Column A
Duck
Goose
Zebra
Giraffe

Column C
Duck
Goose
Deer
Antalope
Giraffe

Column F
Duck
Goose
ZEBRA
Deer
Antalopee
Giraffe

Thus what I am actually wanting is to be able to pull the list that has both similar and diff animals into one list in the order they appear in the rows so as my next step is to make a lookup of those values for other data.

I can extract non shared values from this
https://www.get-digital-help.com/how-to-remove-common-values-between-two-columns/

I can extract shared values from this
https://www.get-digital-help.com/how-to-find-common-values-from-two-lists/

How do I now combine and keep in same order is what Im attempting to do.