+ Reply to Thread
Results 1 to 4 of 4

comparing two lists in excel

  1. #1
    Registered User
    Join Date
    07-08-2005
    Posts
    54

    comparing two lists in excel

    I have two columns of data (A and B) whos cells consist of only numbers in order from 1 to 50. Columns A's ranges from 1 to 50, and every whole number is present. Column B is missing a few numbers. I want to see what numbers are not in column B but are in column A. Is their a formula that could highlight the missing cells?

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    in cell C1 put

    =VLOOKUP(A1,B$1:B$99,1,FALSE)

    and formula-copy this for the number of rows.

    'B$1:B$99' should be the extent of the data in column B

    The #N/A rows are the items you are looking for.

    --

    Quote Originally Posted by petevang
    I have two columns of data (A and B) whos cells consist of only numbers in order from 1 to 50. Columns A's ranges from 1 to 50, and every whole number is present. Column B is missing a few numbers. I want to see what numbers are not in column B but are in column A. Is their a formula that could highlight the missing cells?

  3. #3
    George Nicholson
    Guest

    Re: comparing two lists in excel

    In a third column you could use VLookup to search for an exact match. If it
    returns #N/A then the value is not in the list:
    =IF(ISERROR(VLookup(A2,B$2:B$50,1,False)),"Missing","") (copied down the
    length of values in A)

    Paraphrased: If the exact value of A is not present in the range B2:B50
    (i.e., if Vlookup returns the #N/A error), return "Missing", otherwise
    return "".

    Of course, adjust the ranges to your actual data layout.

    HTH,
    --
    George Nicholson

    Remove 'Junk' from return address.


    "petevang" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have two columns of data (A and B) whos cells consist of only numbers
    > in order from 1 to 50. Columns A's ranges from 1 to 50, and every
    > whole number is present. Column B is missing a few numbers. I want to
    > see what numbers are not in column B but are in column A. Is their a
    > formula that could highlight the missing cells?
    >
    >
    > --
    > petevang
    > ------------------------------------------------------------------------
    > petevang's Profile:
    > http://www.excelforum.com/member.php...o&userid=25034
    > View this thread: http://www.excelforum.com/showthread...hreadid=530786
    >




  4. #4
    Biff
    Guest

    Re: comparing two lists in excel

    Hi!

    Try this:

    Assume the numbers in column A are in the range A1:A50. The numbers in
    column B are in the range B1:B40.

    Select the range, A1:A50.
    Goto Format>Conditional Formatting
    Formula is: =COUNTIF(B$1:B$40,A1)=0
    Click the Format button
    Select the style(s) desired
    OK out

    Biff

    "petevang" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have two columns of data (A and B) whos cells consist of only numbers
    > in order from 1 to 50. Columns A's ranges from 1 to 50, and every
    > whole number is present. Column B is missing a few numbers. I want to
    > see what numbers are not in column B but are in column A. Is their a
    > formula that could highlight the missing cells?
    >
    >
    > --
    > petevang
    > ------------------------------------------------------------------------
    > petevang's Profile:
    > http://www.excelforum.com/member.php...o&userid=25034
    > View this thread: http://www.excelforum.com/showthread...hreadid=530786
    >




+ 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