Comparing lists

Overview

The match list instruction allows a user to compare one cell range with another cell range. In a sense, this instruction is quite similar to the compare range instruction. However, the match list instruction is able to analyse the two ranges (individually, and in comparison with each other) to then generate a ‘diagnostics’ worksheet (inserted to the end of the target file) which summarises these analyses. More specifically, this ‘diagnostics’ worksheet will show: the number of items found in source list,the number of items found in target list,the number of items found only in source list,the number of items found only in target list,the number of items found in both lists. The values of what was found only in the source list, of what was found only in the target list, and of what was found in both lists, will also be displayed.

For the purposes of this article we are going to use two simple and fictitious Excel files. They have already been uploaded into a data step. You will want to replace these files with those of your own.

Before we get started

Please further create a ‘Manipulate a file’ or ‘Multiple file manipulations’ action step so that you can add and use instructions.

The source file that we are going to use looks like this:

The target file that we are going to use looks like this:

We can see that the two files are identical in every way except that cell A5 in the source file contains the value “5,” whereas cell A5 in the target file contains the value “E”.

Steps

1. Create a ‘Compare range’ instruction.

2. Link the file named “Source” as the source file and the file named “Target” as the target file.

3. Select Sheet1 from both files.

4. For both files, use an Advanced Range from cell A1 to the last cell in ColumnA as far as A.

5. The ‘Name of worksheet for results’ field should be populated with “List Matching Results” by default. Change this to “Diagnostics”.

6. Save and run the step.

7. After the step finishes running, download and open the target file. It will resemble the image below:

Leave a Reply

Latest Tweets

Free eBook: 10 Tips for sourcing good data yucalc.com/2017/02/17/fre…

reply · retweet · favorite

Newsletter

By signing up, you agree to our Terms of Service and Privacy Policy.

Address

Suite 1506, Westfield Tower 2, 101 Grafton St Bondi Junction NSW 2022 Australia

View Larger Map

Contact Us

AUS: +61-2-9386-0202
UK: +44-20-8123-1251
Send us an email

ContactUs.com
WordPress Image Lightbox