+ Reply to Thread
Results 1 to 6 of 6

How to identify values that are found in variable_1 but are not found in variable_2?

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    104

    How to identify values that are found in variable_1 but are not found in variable_2?

    Hi Forum,

    I have two variables, called "Income_1" and "Income_2" (please see the attached).

    Question:
    I wanted to return what are the values that are found only in Income_2 variable but are not found in Income_1 variable?

    Answer:
    Answer is provided under "Answer" column.

    I have found the answer manually. Would there be any automated way to generate the numbers in the "Answer" column.
    As I have several thousand observations in my original dataset, I cannot do this manually.
    Thanks
    Mirisa
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: How to identify values that are found in variable_1 but are not found in variable_2?

    Try the following array entered formula*:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    *Array entered formulas are activated by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Attached Files Attached Files
    Last edited by JeteMc; 01-25-2017 at 01:14 PM. Reason: Added .xlsx file
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    104

    Re: How to identify values that are found in variable_1 but are not found in variable_2?

    Hi JeteMc,
    Thank you very much for your answer which worked great!
    However, I cannot understand how are the results are generated by your equation. I googled to get some understanding. I found some bits and pieces from google but not fully understand how your equation works. I know <> implies not equal to. IFERROR together with last most "" in your equation is to avoid returning N/A. But Could you help me to fully understand how does your equation generate correct results. Thanks

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: How to identify values that are found in variable_1 but are not found in variable_2?

    One of the best ways that I know to see how a formula works is to select a cell, say D2, of the file attached to post #2, and run Evaluate formula from the Formula tab. You'll notice that the first thing the formula does is produce an array of TRUE/FALSE values based on whether or not the values in column A are also found in column B. Next you'll see that the formula has merged the numbers in column B with the TRUE/FALSE array producing an array that keeps all of the FALSE's but replacing the TRUE's with the corresponding numbers. Next the ROW function returns a number, in this case 6, that the SMALL function uses to pick the number, and in this case the 6th smallest number is 18. I hope that explanation is helpful.
    Let us know if you have any questions.

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    104

    Re: How to identify values that are found in variable_1 but are not found in variable_2?

    Hi JeteMc,
    Thank you so much for your time and expertise.

    Regards

    Mirisa

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: How to identify values that are found in variable_1 but are not found in variable_2?

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Searching column 1 with data from 2 and reporting found or not found
    By San75 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2016, 05:23 PM
  2. Search for value in a range and overwrite if found and create new if not found
    By mm671750 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-04-2016, 01:19 PM
  3. Replies: 5
    Last Post: 04-15-2015, 02:58 PM
  4. Check for values in a table and if found add value found in column to left to list
    By robhargreaves in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-07-2013, 02:57 PM
  5. identify found cell by changing color
    By ClearConcept in forum Excel General
    Replies: 2
    Last Post: 10-30-2009, 03:26 PM
  6. Identify where max values are found
    By owen080808 in forum Excel General
    Replies: 4
    Last Post: 04-05-2006, 05:20 PM
  7. [SOLVED] Formula to identify what was NOT found
    By Arla M in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-10-2005, 12:06 PM

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