+ Reply to Thread
Results 1 to 7 of 7

compare contents of two adjacent columns

Hybrid View

  1. #1
    Adam
    Guest

    compare contents of two adjacent columns

    Hi,

    I have two columns of text that I want to compare.

    I need to see whether any of the values in column A are missing from column B.

    EG:

    A B C

    ab4 ah6 no match
    ab5 zqv no match
    abs abs match
    abv abv match

    Hopefully it can give something like Column C as the result.

    I have tried IF statements & functions such as Exact but cant get it to work.

    Any help will be very much appreciated.

    Many Thanks.




  2. #2
    Gary's Student
    Guest

    RE: compare contents of two adjacent columns

    =IF(A1=B1,"match","no match")

    and then copy down column C
    --
    Gary's Student


    "Adam" wrote:

    > Hi,
    >
    > I have two columns of text that I want to compare.
    >
    > I need to see whether any of the values in column A are missing from column B.
    >
    > EG:
    >
    > A B C
    >
    > ab4 ah6 no match
    > ab5 zqv no match
    > abs abs match
    > abv abv match
    >
    > Hopefully it can give something like Column C as the result.
    >
    > I have tried IF statements & functions such as Exact but cant get it to work.
    >
    > Any help will be very much appreciated.
    >
    > Many Thanks.
    >
    >
    >


  3. #3
    Adam
    Guest

    RE: compare contents of two adjacent columns

    Thanks Gary, but I need to compare values in the whole of column B to the
    specific ones in column A.

    Eg Compare Cell A1 to any value in the whole of column B.

    "Gary's Student" wrote:

    > =IF(A1=B1,"match","no match")
    >
    > and then copy down column C
    > --
    > Gary's Student
    >
    >
    > "Adam" wrote:
    >
    > > Hi,
    > >
    > > I have two columns of text that I want to compare.
    > >
    > > I need to see whether any of the values in column A are missing from column B.
    > >
    > > EG:
    > >
    > > A B C
    > >
    > > ab4 ah6 no match
    > > ab5 zqv no match
    > > abs abs match
    > > abv abv match
    > >
    > > Hopefully it can give something like Column C as the result.
    > >
    > > I have tried IF statements & functions such as Exact but cant get it to work.
    > >
    > > Any help will be very much appreciated.
    > >
    > > Many Thanks.
    > >
    > >
    > >


  4. #4
    Dodo
    Guest

    Re: compare contents of two adjacent columns

    "=?Utf-8?B?QWRhbQ==?=" <Adam@discussions.microsoft.com> wrote in
    news:B4524B07-8D5F-46AF-A5F9-DDEAE9BE5369@microsoft.com:

    > I need to see whether any of the values in column A are missing from
    > column B.
    >
    > EG:
    >
    > A B C
    >
    > ab4 ah6 no match
    > ab5 zqv no match
    > abs abs match
    > abv abv match
    >


    Pity it isn't your B-column that is sorted. You could then have used the
    vlookup function.
    Perhaps you can copy the B-column values to a different column, sort it
    there and then do the lookup?


    --

    It is I, DeauDeau
    (Free after monsieur Leclerc in 'Allo, 'allo)

  5. #5
    Adam
    Guest

    Re: compare contents of two adjacent columns

    Thanks Dodo,

    Yes I could sort column B, if I did how would I construct the lookup bearing
    in mind I need to match specific values in column A to any in B ?

    "Dodo" wrote:

    > "=?Utf-8?B?QWRhbQ==?=" <Adam@discussions.microsoft.com> wrote in
    > news:B4524B07-8D5F-46AF-A5F9-DDEAE9BE5369@microsoft.com:
    >
    > > I need to see whether any of the values in column A are missing from
    > > column B.
    > >
    > > EG:
    > >
    > > A B C
    > >
    > > ab4 ah6 no match
    > > ab5 zqv no match
    > > abs abs match
    > > abv abv match
    > >

    >
    > Pity it isn't your B-column that is sorted. You could then have used the
    > vlookup function.
    > Perhaps you can copy the B-column values to a different column, sort it
    > there and then do the lookup?
    >
    >
    > --
    >
    > It is I, DeauDeau
    > (Free after monsieur Leclerc in 'Allo, 'allo)
    >


  6. #6
    Dodo
    Guest

    Re: compare contents of two adjacent columns

    "=?Utf-8?B?QWRhbQ==?=" <Adam@discussions.microsoft.com> wrote in
    news:6D722F15-0101-4311-8283-F7B74EA151E4@microsoft.com:

    > Thanks Dodo,
    >
    > Yes I could sort column B, if I did how would I construct the lookup
    > bearing in mind I need to match specific values in column A to any in
    > B ?
    >


    I'm supposing Row1 contains labels. Then in cell C2 I would put:

    =IF(ISERROR(VLOOKUP(A2;B2:B5;1));"No match";"Match")

    Copy this formula down column C.


    --

    It is I, DeauDeau
    (Free after monsieur Leclerc in 'Allo, 'allo)

  7. #7
    Dodo
    Guest

    Re: compare contents of two adjacent columns

    Dodo <dodo2u@-takethisNOSPAMout-freemail.nl> wrote in
    news:Xns96ACC33D2A159dodo2ufreemailnl@130.133.1.4:

    > "=?Utf-8?B?QWRhbQ==?=" <Adam@discussions.microsoft.com> wrote in
    > news:6D722F15-0101-4311-8283-F7B74EA151E4@microsoft.com:
    >
    >> Thanks Dodo,
    >>
    >> Yes I could sort column B, if I did how would I construct the lookup
    >> bearing in mind I need to match specific values in column A to any in
    >> B ?
    >>

    >
    > I'm supposing Row1 contains labels. Then in cell C2 I would put:
    >
    > =IF(ISERROR(VLOOKUP(A2;B2:B5;1));"No match";"Match")
    >
    > Copy this formula down column C.
    >
    >


    Oops, forgot to fix the lookup range!

    So, make the formula:

    =IF(ISERROR(VLOOKUP(A2;$B$2:$B$5;1));"No match";"Match")

    And set the range to the range you actually have before you copy the
    formula down.

    --

    It is I, DeauDeau
    (Free after monsieur Leclerc in 'Allo, 'allo)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1