+ Reply to Thread
Results 1 to 7 of 7

Checking a column against a list

  1. #1
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Checking a column against a list

    I have had a look around forums for a solution to this problem, but to no avail.

    This is what I want to do.

    I have on one page a column of registration numbers, which can in some cases appear more than once.

    On another page i have a list of registration numbers that i need to check

    What i want is a function to check the column on page one and compare these to the list on the other page and then highlight the reg numbers which dont match.

    G

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Checking a column against a list

    You can do the highlighting with conditional formatting. Or you could set a flag in the adjacent column.

    To set a flag in the next column, use a formula like this and copy down

    =if(isna(match(A1,Sheet2!$A$1:$A$100,0)),"no match","")

    edit: corrected formula typo

    Or to change the color for values with no match, select the whole range, then click Format - Conditional formatting - formula is -

    =isna(match(A1,Sheet2!$A$1:$A$100,0))

    edit:corrected formula typo. sorry for the confusion

    then set a format

    in both suggestions, adjust ranges and sheet names to reflect your data source.

    hth
    Last edited by teylyn; 12-09-2009 at 03:40 PM. Reason: corrected formulae

  3. #3
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Re: Checking a column against a list

    Thanks for the advise

    I tried the code below

    Please Login or Register  to view this content.
    but keep getting an error on "A1" part of the formula

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Checking a column against a list

    not reviewed the thread in full but re: last post - it's a typo - change the comma post MATCH to open parenthesis

    Please Login or Register  to view this content.

  5. #5
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Checking a column against a list

    Thanks DO for picking that up. I corrected the typos in my original post.

  6. #6
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Re: Checking a column against a list

    Thanks for that correction, but entered the formula into the conditional formatting user box and am informed that you can not make a ref to another sheet within conditional formatting....

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Checking a column against a list

    You will need to "Name" the range Sheet2!A1:A100 and use the Name in the Conditional Formatting formula.

    for "how to" see: http://www.contextures.com/xlNames01.html

+ 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