+ Reply to Thread
Results 1 to 16 of 16

compare two excel sheets and show missing data in a new sheet

  1. #1
    Registered User
    Join Date
    01-03-2016
    Location
    bern, switzerland
    MS-Off Ver
    2010
    Posts
    16

    compare two excel sheets and show missing data in a new sheet

    Hi guys,

    I really need some help on this.

    I want to compare 2 excel sheets and find out
    the missing user data, not only the name, but also the full details.
    The titles of these 2 sheets are the same and it has 13 columns.

    And I would like to show the results in a new sheet.

    for instance;
    users are using 2 different learning systems, lms & lso.
    So, I would like to compare the January & February list (based on the USER ID)and
    the results should show 'LSO' users who didn't appear in the previous month. (this case January)

    cheers
    -Jhonny
    Attached Files Attached Files
    Last edited by jhonnyexcel; 01-03-2016 at 07:54 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: compare two excel sheets and show missing data in a new sheet

    Are those real names and email addresses??? If so, you should really remove them, unless they're spam lovers....
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    01-03-2016
    Location
    bern, switzerland
    MS-Off Ver
    2010
    Posts
    16

    Re: compare two excel sheets and show missing data in a new sheet

    thanks glenn
    will do it right now

  4. #4
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    607

    Re: compare two excel sheets and show missing data in a new sheet

    Hi jhonny, this example uses 2 helper columns that look up the employee ID's and list them if they didn't appear in the previous month.
    Attached Files Attached Files

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

    Re: compare two excel sheets and show missing data in a new sheet

    Hi Jhonny,

    I have a different answer. It seemed to me you wanted to append Jan and Feb sheets and then do a count on "Local/CHRIS employee ID". If the count was 2 then they were in the other month. If the count was only 1 then they were in Jan and not Feb OR Feb and not Jan. I could have simply copied Feb and pasted it on the bottom of Jan but I instead used a newer feature in Excel called Power Query where you can append tables. See the result on Sheet3. I then created a new column with a formula to count "Local/CHRIS employee ID" and if it was only one it was unique. Is this what you wanted?
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Registered User
    Join Date
    01-03-2016
    Location
    bern, switzerland
    MS-Off Ver
    2010
    Posts
    16

    Re: compare two excel sheets and show missing data in a new sheet

    thanks beamernsw ... what if I change the months.
    Because I'm planning keep this as a template.

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

    Re: compare two excel sheets and show missing data in a new sheet

    Hi Beamernsw,

    Does you workbook show people who were IN Jan and not in Feb? I read this problem as people who appeared only once between the two months. That would be new people in Feb and people who were in Jan and not in Feb.

  8. #8
    Registered User
    Join Date
    01-03-2016
    Location
    bern, switzerland
    MS-Off Ver
    2010
    Posts
    16

    Re: compare two excel sheets and show missing data in a new sheet

    thanks MarvinP...!!!

    that's not really what I need.
    I may have the same users or new users in the forthcoming months.

    So, I would like to compare the sheets and find out the missing names (based on the USER ID)
    and the results should show 'LSO' users who didn't appear in the previous month.
    Because I would like to keep this as a template for future.

  9. #9
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    607

    Re: compare two excel sheets and show missing data in a new sheet

    I would suggest, to make it easier, rename the sheets to "This Month" and "Last Month".

    Then just for getting this list, select all the data from "Current Month" and paste values over "Last Month", then do the same for the current sheet (say March) and paste it over the "Current Month" sheet.

    Sounds confusing but should only take 20 or 30 seconds to do.

  10. #10
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    607

    Re: compare two excel sheets and show missing data in a new sheet

    Actually, you could use the following in the formulas with indirect to get the sheet names.

    =TEXT(TODAY(),"mmm") <----- Current Month
    =TEXT(EOMONTH(TODAY(),-1),"mmm") <----- Last Month
    =TEXT(EOMONTH(TODAY(),-2),"mmm") <----- Two Months Ago

    But I believe that both INDIRECT and TODAY are volatile and using them in nearly every cell would probably slow your workbook down incredibly.
    Last edited by Beamernsw; 01-03-2016 at 12:52 PM.

  11. #11
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: compare two excel sheets and show missing data in a new sheet

    Here is a VBA workaround, please find the attached workbook and click the button on the Magic Button Sheet to create a Report Sheet with the comparison between two sheets.

    You will be prompted to select the sheets which you want to compare from the two comboboxex i.e.
    1) With Compare Sheet Combobox, select the sheet e.g. Feb.
    2) With With Sheet Combobox, select the sheet e.g. Jan.
    3) And then click the Compare button to compare the selected sheets.

    See if this is something you can work with.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  12. #12
    Registered User
    Join Date
    01-03-2016
    Location
    bern, switzerland
    MS-Off Ver
    2010
    Posts
    16

    Re: compare two excel sheets and show missing data in a new sheet

    thanks sktneer..!!
    but I'm getting different values, I mean different number of users when I tried to make changes in
    the list.

    cheers, hope you can have a look at it.

  13. #13
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: compare two excel sheets and show missing data in a new sheet

    Not sure exactly what are you saying.
    The code creates a Report Sheet with the records where the the Users on the Feb sheet use LSO as Primary System but missing from the Jan Sheet.
    Is that not what you are trying to achieve?

    See the attache. I have changed the User Ids on both the sheet and both the sheets are having 9 rows of data to compare the records with the output you get after running the code. As you can see there are only two users on Feb Sheet with User IDs N and Q who use LSO as Primary System and missing from the Jan Sheet.

    Before comparing the sheets, I selected Feb from the 1st combobox and Jan from the 2nd combobox.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    01-03-2016
    Location
    bern, switzerland
    MS-Off Ver
    2010
    Posts
    16

    Re: compare two excel sheets and show missing data in a new sheet

    Thanks a lot @sktneer
    I really appreciate it, It's working.

    Cheers
    -Jhonny

  15. #15
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: compare two excel sheets and show missing data in a new sheet

    You're welcome. Glad I could help.

    If that takes care of your original question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

  16. #16
    Registered User
    Join Date
    01-03-2016
    Location
    bern, switzerland
    MS-Off Ver
    2010
    Posts
    16

    Re: compare two excel sheets and show missing data in a new sheet

    yep, I did it.
    thanks again sktneer.

+ 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. Replies: 6
    Last Post: 04-22-2014, 11:32 AM
  3. [SOLVED] Compare 2 sheets and add missing data from sheet2 to sheet 1 before certain row value
    By Risto85 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-03-2013, 09:40 AM
  4. [SOLVED] Compare Sheets Find Missing Data
    By ClarkKent88 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-08-2012, 01:51 AM
  5. compare and extract missing data from 2 sheets
    By BIGIFA in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-29-2011, 11:40 AM
  6. [SOLVED] How do i compare two excel sheet and get it to show me diff.
    By Sky Yeo in forum Excel General
    Replies: 4
    Last Post: 12-22-2005, 03:20 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