Excel finding value not exist in range.

Posted on 2011-04-28
Last Modified: 2012-05-11
I have 2 columns:
A      B
1       2
2       4

and I want to find column C with value in column A but not exist in column B.

How can I do it?
Question by:JameMeck
    LVL 5

    Accepted Solution

    LVL 43

    Expert Comment

    by:Saqib Husain, Syed
    If you like to have a macro you can use this. This will list the numbers continuously
    Sub extna()
    For Each cel In Range("A:A")
    Set tl = Range("B:B").Find(cel, , , xlWhole)
    If tl Is Nothing Then n = n + 1: Cells(n, 4) = cel
    Next cel
    End Sub

    Open in new window


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
    Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
    The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
    This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now