+ Reply to Thread
Results 1 to 8 of 8

Compare two arrays(contains multiple columns and rows) and return the missing

  1. #1
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Compare two arrays(contains multiple columns and rows) and return the missing

    Hello Everybody:
    Data Sheet contains full list of Employees Names
    In Report sheet,there are some employees names(not all of them) that are taken from Data Sheet
    Question: I want a formula to get the missing employees names in Report sheet
    Note: I want a short formula as possible
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Compare two arrays(contains multiple columns and rows) and return the missing

    In "Data"

    in C2

    =COUNTIF(Report!$B$2:$L$48,Data!B3)

    copy down

    In "Report"

    C58

    =IFERROR(INDEX(Data!B:B,SMALL(IF(Data!$C$2:$C$200=0,ROW($B$2:$B$200),""),ROWS($1:1))),"")

    ...confirmed 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.

  3. #3
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Compare two arrays(contains multiple columns and rows) and return the missing

    Thank you very much sir but I don`t like helping columns.
    Can you found another solution without using helping columns>

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Compare two arrays(contains multiple columns and rows) and return the missing

    Hi leprince,

    I don't like helping columns either, but without using macros, I think the above solution is the shortest one possible.

    If you don't like helping columns, then you might want the Data on the same sheet as the report and do a Conditional Formatting that shows duplicates on the sheet. That would keep from using a helper column. The names not formatted using CF would be your answer.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Compare two arrays(contains multiple columns and rows) and return the missing

    =INDEX(Data!$B:$B,AGGREGATE(15,6,ROW(Data!$B$2:$B$141)/(1/(COUNTIF(Report!$B$2:$L$48,Data!$B$2:$B$141)=0)),ROWS($A$58:$A58)))

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Compare two arrays(contains multiple columns and rows) and return the missing

    "Note: I want a short formula as possible" --- No problem

    =IFERROR(INDEX(Data,SMALL(IF(COUNTIF(Names,Data)=0,ROW(INDIRECT("1:"&ROWS(Data)))),ROWS($1:1))),"")

    Array formula: Press Ctrl+Shift+Enter, not just Enter
    "Data" range: B2:B41 on data sheet
    "Name" range: B2:L48 on report sheet

  7. #7
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    Re: Compare two arrays(contains multiple columns and rows) and return the missing

    Thank you very much Teethless mama

  8. #8
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Compare two arrays(contains multiple columns and rows) and return the missing

    Quote Originally Posted by leprince2007 View Post
    Thank you very much Teethless mama
    You're Welcome!

+ 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. [SOLVED] Compare two columns on separate sheet, if missing, insert missing data
    By lilvictorians in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-03-2019, 11:44 PM
  2. Compare Single Column Range against Multiple Columns and return Sum
    By rcrabtree09 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-05-2017, 12:07 AM
  3. [SOLVED] Compare multiple columns and return header value
    By sarajun_88 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-09-2017, 10:27 PM
  4. [SOLVED] Compare multiple rows with unique identifiers to return action
    By Scoobing in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-30-2014, 05:03 PM
  5. Compare and search multiple columns, return text as answer
    By ackjaf in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-25-2014, 02:04 AM
  6. Replies: 2
    Last Post: 12-04-2013, 09:45 PM
  7. Compare Values in Multiple Columns and return a result
    By edbhome in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-18-2009, 09:37 AM

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