+ Reply to Thread
Results 1 to 3 of 3

Using IF and COUNTIF to show changes between 2 workbooks

  1. #1
    Registered User
    Join Date
    11-13-2013
    Location
    Southampton, England
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question Using IF and COUNTIF to show changes between 2 workbooks

    Good morning!

    I'm having a bit of a brain-freeze with excel this morning and wondering if anyone's able to point me in the right direction.

    In short, the 2 problems I'm trying to solve with excel are:

    1. Are any of the PROGRAM_KEY values in BEFORE present in AFTER but with their PROGRAM_ID values changed? ( It doesn’t matter if any PROGRAM_KEY values are missing between before and after)
    2. Are there any PROGRAM_KEY values in AFTER that are not in BEFORE that have PROGRAM_ID values that are used in BEFORE

    So far I've combined the 2 workbooks into two sheets, and tried a variety of IF and COUNTIF functions to try and get it to compare the data cross-sheet. The main problem seems to be the different number of values in BEFORE and AFTER (16k vs 28k), and what I'm trying to do (I believe) requires some kind of IF within the COUNTIF to give me the results I need. I was also having issues I believe because the PROGRAM_KEY's can contain colons and a mix of letters and numbers, so applying standard COUNT's to these seemed to be failing (excel also kept trying to convert it to number form and removing the prefixing 0's form the PROGRAM_KEYs).

    Just wondering if anyone has any tips they could share on what I'm trying to do? - I'm willing to accept if excel isn't the right tool for no2. - Just seems to be getting me stumped at the moment!

    I've uploaded the first 2000 rows of both spreadsheets (to keep the file size within forum upload limits), although they do have ~16k and ~28k in their entirety.

    (all data has been desensitized before uploading!)

    Many thanks in advance,
    Rob

    AFTER.xls
    BEFORE.xls
    Last edited by rssfed23; 11-13-2013 at 06:50 AM. Reason: marking as solved

  2. #2
    Forum Contributor aganesan99's Avatar
    Join Date
    04-26-2013
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Using IF and COUNTIF to show changes between 2 workbooks

    Hi Rob,

    Please find attached the excel, where I have consolidated both BEFORE and AFTER data and gave a pivot. In the "Final Pivot" tab in the count columns you can use the filter and see which PROGRAM_KEY are available in both the files by filtering for "1" in both the "AFTER" and "BEFORE" columns and vice versa.

    Thanks,
    aganesan99
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-13-2013
    Location
    Southampton, England
    MS-Off Ver
    Excel 2010
    Posts
    2
    Thanks agansen99 - Much appreciated & has been able to set me on the right track for the larger data set

+ 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] Countif across workbooks
    By vivekmartin in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-13-2013, 01:24 PM
  2. Countif between two workbooks!
    By RadioX in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-22-2012, 01:42 PM
  3. [SOLVED] How to show 2 (or more) workbooks in their own window?
    By Søren Larsen in forum Excel General
    Replies: 2
    Last Post: 03-30-2012, 07:12 AM
  4. Show all workbooks open
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2006, 05:34 AM
  5. help should show how to refer to other workbooks
    By Naemdx in forum Excel General
    Replies: 1
    Last Post: 08-03-2005, 11:05 AM

Tags for this Thread

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