Consulting

Results 1 to 4 of 4

Thread: 2 different lists

  1. #1
    VBAX Regular
    Joined
    Jan 2016
    Posts
    13
    Location

    2 different lists

    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.

  2. #2
    Moderator VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,814
    Location
    Why antelope and deer but not zebra?
    I expect the student to do their homework and find all the errrors I leeve in.


    Please take the time to read the Forum FAQ

  3. #3
    VBAX Expert Leith Ross's Avatar
    Joined
    Oct 2012
    Location
    San Francisco, California
    Posts
    552
    Location
    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.
    Sincerely,
    Leith Ross

    "1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG"

  4. #4
    VBAX Regular
    Joined
    Jan 2016
    Posts
    13
    Location
    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...n-two-columns/

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

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •