<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by PrepJet on Medium]]></title>
        <description><![CDATA[Stories by PrepJet on Medium]]></description>
        <link>https://medium.com/@PrepJet?source=rss-44bf661ed5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*gLqu5ci7k7J6tU7t.jpg</url>
            <title>Stories by PrepJet on Medium</title>
            <link>https://medium.com/@PrepJet?source=rss-44bf661ed5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 06:56:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@PrepJet/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Prepare your data for analysis in five steps using Excel]]></title>
            <link>https://medium.com/@PrepJet/prepare-your-data-for-analysis-in-five-steps-using-excel-9869006e0a9e?source=rss-44bf661ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9869006e0a9e</guid>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data-preparation]]></category>
            <dc:creator><![CDATA[PrepJet]]></dc:creator>
            <pubDate>Wed, 10 Aug 2016 22:58:00 GMT</pubDate>
            <atom:updated>2016-10-17T12:57:12.947Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*JZioBU4Rooxz0Bhi3nwRIg.png" /><figcaption>The five steps of data preparation</figcaption></figure><p>Most data sets require preparation before analysis. Garbage in, garbage out — your analysis will only yield meaningful results if your data has high quality. Particularly when dealing with small or medium-size data sets, wrong entries and inconsistent values can have a tremendous impact on your analysis — they will introduce <a href="http://www.prepjet.de/resources/data-wiki/#C">bias</a>. The data preparation process can imply different tasks, depending on the type of data you analyze.</p><p>What should you pay attention to when getting your data ready for analysis? And how can you perform these steps efficiently in Microsoft Excel? Assuming that you already collected your data, you should go through the five steps of data preparation. Our checklist guides you through the data preparation process. The comprehensive explanations below provide you with some hints on how to implement these data cleaning tasks in Excel. We point out how PrepJet helps you with these steps, however, we always show how to work with “pure” Excel functionalities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*AOowqSKYOKZGeNSgMqp2zg.png" /></figure><p>Needless to say — but still worth a reminder: Do not forget to save a backup of your raw data before going on with data preparation in case you want to lookup some information in the original data. One more tip beforehand: If you are dealing with large data sets that cause Excel to become slow when performing certain operations, simply try the operation with a small sample before applying it to the whole data set. You can grab some coffee while Excel is calculating. If your coffee consumption gets too high while preparing your data, you might want to try PrepJet, which can perform certain operations more quickly than Excel formulas (e.g. when looking up data from different tables).</p><h3>1. Import data</h3><h4>Split data along delimiters</h4><p>When you import your data, you should be aware of a clean delimitation of your entries. IT systems usually define a delimiter such as a semicolon or a comma. In Microsoft Excel, we recommend to use the import function to get your data into a tabular shape, also if you import a csv and not a txt file. Compared to simply opening the csv file, the import function has the advantage that you can define the character encoding. Our animation shows you how to use the import function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8sN5PE6OSOXtwwka-xpaGw.gif" /></figure><p>If you need a more sophisticated separation of your columns, you can use PrepJet’s “Separate Cell Content” function. It allows you to define the position of the delimiters.</p><h4>Extract parts from data entries</h4><p>In case your import did not work well or you need only a part of a certain attribute (such as a part from a nested ID), you have to perform more advanced split operations. For example, if you want to extract the domains of email addresses, you have to extract the part between the @ and the last dot. If you use original Excel functions, LEFT, RIGHT will help you to extract text parts. With FIND, you can specify the delimiters (in our case “@” and “.”), with LEN, you can define the length of the character sequences you want to extract. You will have to workaround with a few combinations to finally get the domain:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*OVmFU-VZ8Cf-peAe983yzA.png" /></figure><p>If you don’t want to write lengthy formulas, you can use PrepJet’s Extract Text function. It allows you to extract text parts from a column in a few clicks.</p><h4>Remove leading and trailing spaces</h4><p>System exports or web-scraped data often cause unwanted leading and trailing spaces. You can remove those spaces by using the Excel TRIM function (do not use find and replace as this will also remove spaces between words!). The syntax is as follows:</p><p>=TRIM(text)</p><p>If you do not want to repeat this exercise for every single column, you can use PrepJet’s Trim Spaces function which allows you to trim your whole sheet in a single click.</p><h3>2. Format adjustments</h3><h4>Standardize formats</h4><p>Before combining and analyzing data, it is crucial to harmonize the formats of your data. If your data comes from different countries or IT systems with different languages, you should make sure to have consistent decimal separators (comma vs. dot). The same applies for date formats (e.g. DD.MM.YYYY vs. MM/DD/YYYY) currencies (e.g. EUR vs. USD) or measurement units (e.g. miles vs. kilometers). In Excel, the best solution is to transform data sets with different formats into one standard before combining them. For date types, you can use Excel’s “Number” functionality. Click on the lower right arrow to define a custom format:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fwYdmAG7BSZqZFsNCJ5j3w.png" /></figure><p>If you want to unify the spelling of your data entries (e.g. UPPERCASE vs. Normal Case), you can use PrepJet’s Change Case function.</p><h4>Store data in the correct format</h4><p>To make sure that your data is analyzed appropriately, you should store it in the correct format. For example, your data might contain a numerical Identifier which has however no numerical meaning. Tell Excel that this is not a number by classifying it as text. Excel helps you to specify the date format in the Home ribbon in the section “Number” (see above). To perform a final check on the format of your data, you can use PrepJet’s Find Inconsistencies function which highlights inconsistent data types automatically.</p><h4>Replace unrecognized or corrupted characters</h4><p>In case your import failed for some reason, some symbols might be corrupted after an export as the encoding of characters might differ between IT systems. Characters like “ÃŸ” might introduce problems if you want to work with your data. We recommend to correct them using the find and replace function.</p><h4>Check for truncated entries</h4><p>When exporting data from IT systems, a lot of annoying accidents can happen. One of them is truncations, i.e. data entries are cut off at a certain position. Some manual screening should quickly lead you to suspicious data. How to fix it? The best solution is probably to request a new and healthy export.</p><h3>3. Correct inconsistencies</h3><h4>Check for inconsistent entries using custom rules</h4><p>The most valuable resource when preparing data for analysis is your own knowledge about the data. With custom rules (so-called <a href="http://www.prepjet.de/resources/data-wiki/#B">Business Rules</a>), you can detect wrong data. The whole process follows the principles of Boolean logic . You can define simple conditions. Before applying any rules to your data, it is always helpful to spell them in natural language, e.g.: “The entries in column ‘Age’ always have to be greater or equal zero.”</p><p>PrepJet has a functionality that helps you to implement custom validation rules easily without a lot of nested formulas and additional validation columns. You can also implement validation rules in Excel using the IF function. You will have an additional validation column that indicates whether the rule is fulfilled or not (this is also the column into which you type your formula). Here, we want the output in our validation column to be “ok” if the Age is greater or equal zero and we want to have “error” if the Age is smaller than zero (assuming that column F contains Age):<br> <br> =IF(F2&gt;=0; “ok”; “error”)<br> <br> You can also implement more complex conditions. For example, if you want to analyze your product range, you could apply the rule “The shipping weight of an article of the category pants is always smaller than 2kg.” To make the implementation in Excel easier, it is helpful to phrase the condition closer to logical terminology first:<br> <br> IF “category” EQUAL TO “pants” THEN “shipping_weight” SMALLER THAN “2”<br> <br> In Excel, we again have a validation column that indicates whether our rule is violated (“error”) or not (“ok”).<br> <br> To be prepared for Excel’s syntax, we have to rephrase the logical statement as follows:<br> <br> IF “category” EQUAL TO “pants” AND “shipping_weight” SMALLER THAN “2” THEN “ok” ELSE “error”<br> <br> Assuming that column B contains category and column C contains shipping weight, we insert the following formula into the validation column and drag it down to the end of our table:<br> <br> =IF(AND(B2=”pants”; C2&lt;2); “ok”; ”error”)<br> <br> You can even go further and introduce conditions with more nestings, conditions that have to be fulfilled cumulatively (using the AND function) or conditions that can be fulfilled selectively (using the OR function). Again, you can make your live a little easier using PrepJet’s Rule-based Validation function.</p><h4>Numerical data: Check for outliers</h4><p>If you work with numerical data, you should check your data for outliers. Outliers are values that deviate from the observed distribution of your data (learn more in our <a href="http://www.prepjet.de/2015/11/25/an-introduction-to-outlier-detection-how-to-discover-the-black-sheep-in-your-data/">blog post on the basics of outlier detection</a>). As statistical outlier detection is rather complex to be implemented in Excel, we recommend to sort the values by size and to check if there are any suspicious entries at the upper or lower bounds of your range.</p><h4>Categorical data: Check for wrong categories</h4><p>If you analyze <a href="http://www.prepjet.de/resources/data-wiki/#C">categorical data</a>, it is important to make sure that there are no different conventions for assigning categories. For example, if you want to analyze your product portfolio, make sure that similar products are not put into different categories (e.g. if you work with a grocery store, all apples, bananas and mangos might be classified as “fruits” while someone accidentally tagged pineapple as “exotic fruit”. There are different ways to detect those kind of miscategorizations in Excel. If you have a small number of categories, you can simply insert a filter and manually check all available categories. If you have a larger range of categories, it is more advisable to plot the frequency of occurrences in each categories (e.g. with a bar chart in Excel). You can focus on categories with low frequencies of occurrence. Here in our example chart, in a few cases “blu” has been entered instead of “blue”. You can easily fix this by using Find and Replace</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*fdDe9kK--1bR1Bmdz56OJg.png" /></figure><p>PrepJet helps to handle suspicious categories more quickly with an intelligent find and replace feature that is called Harmonize Categories.</p><h4>Missing entries: Add data or remove rows</h4><p>Missing values are an issue that is hard to fix. If you have the chance to get the original data without inappropriate efforts, the best solution is to add it. Otherwise, you might want to ignore the rows that contain empty cells when performing certain analyses. A more advanced option is to <a href="http://www.prepjet.de/resources/data-wiki/#I">impute</a> the data (e.g. by the mean or median or by a <a href="http://www.prepjet.de/resources/data-wiki/#L">logistic regression</a>). This is only recommendable for users with advanced statistical knowledge as it might <a href="http://www.prepjet.de/resources/data-wiki/#B">bias</a> your results.</p><h4>Survey data: Detect suspicious response patterns</h4><p>When analyzing survey data, you should be aware of response patterns that are not valid (e.g. because the respondent simply was too tired to answer all your questions appropriately …). This might be for example a person who always chooses the answer in the same position for each question — so-called straight-lining (e.g. always the most left option). More creative respondents also create alternating patterns when answering surveys (so-called “Christmas tree behavior”). If you use an online survey tool, as a first step you can try to identify those answers that have been filled in in very short time by looking at the response timers. Most online survey tools will export the time the respondents take to fill in the form with your survey data. In a second step, you can identify suspicious data by screening the replies in Excel. This will be easier once you translated categorical text responses into numbers (e.g. “I fully agree” = 1, “I agree” = 2 etc.).</p><h3>4. Remove duplicates</h3><h4>Deduplicate your data considering fuzzy duplicates</h4><p>Another important step before you combine and analyze data sets is to remove duplicate entries. This is simple if you only want to find exact duplicates. You can directly remove them with Excel’s Remove Duplicates function in the Data Ribbon. If you first want to check the duplicate entries to examine where they come from, you can highlight and sort them with PrepJet’s Detect Duplicates function.</p><p>Often, however, actual duplicates are not exactly equal. They might differ slightly due to typos or different naming conventions. To detect these kind of duplicates, you either need a sophisticated fuzzy matching algorithm or a manual workaround (learn more in our <a href="http://www.prepjet.de/2016/01/14/how-to-match-tables-without-unique-identifier-an-introduction-to-fuzzy-matching/">introduction to fuzzy matching</a>). One manual solution can be to include only a few attributes into your duplicate screening. For example, if you want to find duplicates in a customer list and names might have been spelled differently, you can in a separate step only have a look at the address fields. It should also help to standardize categorical data (see above) first before searching for duplicates.</p><h3>5. Combine data sets</h3><h4>Lookup data from other tables</h4><p>If you do not only want to analyze a single data set, the final step to get your data ready for analysis is to combine it. You could simply copy columns from one sheet to another if your data is sorted. However, this is not recommendable as you risk to copy the wrong data in case one data set misses a row. It is better to identify match criteria and pull your data based on these criteria from one table into another. If you have one match criterion that is unique for each row of your data set (a so-called unique identifier), you can use this match criterion and perform a VLOOKUP in Excel. If you have more than one match criteria, you have to use a combination of INDEX and MATCH (check out our <a href="http://www.prepjet.de/2016/06/24/let-s-trick-excel-vlookup-how-to-lookup-lists-with-multiple-criteria-using-index-and-match/">blog post</a> on this operation). Or you can use PrepJet’s Lookup Data function, which allows you to specify as many match criteria as you want in only a few clicks.</p><p>Now that you are done with the strenuous part — enjoy your analysis! :-)</p><p><em>Originally published at </em><a href="http://www.prepjet.de/2016/08/10/preparing-your-data-for-analysis-in-five-steps/"><em>www.prepjet.de</em></a><em> on August 10, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9869006e0a9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to discover the “black sheep” in your data]]></title>
            <link>https://medium.com/@PrepJet/how-to-discover-the-black-sheep-in-your-data-a35da658ef1b?source=rss-44bf661ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a35da658ef1b</guid>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-preparation]]></category>
            <category><![CDATA[outliers]]></category>
            <dc:creator><![CDATA[PrepJet]]></dc:creator>
            <pubDate>Wed, 10 Aug 2016 06:59:13 GMT</pubDate>
            <atom:updated>2016-08-10T07:03:31.764Z</atom:updated>
            <content:encoded><![CDATA[<h3>An introduction to outlier detection</h3><p>Detecting outliers in your data is a crucial step when preparing data for analysis. Outliers might introduce bias to the results of your analysis and lead you to wrong insights. Garbage in, garbage out. Outliers are not bad per se, they might just indicate a high variation of a variable that is measured. For example, there is not a lot of people who reach the age of 102, but a data set might in fact contain an entry of a 102 year old person. However, outliers can also be the result of data entry or system error or of fraudulent behavior. That’s why they have to be investigated when preparing data for analysis. However, outliers should never be deleted without further clarification. (If you need someone to discuss your outliers —feel free to <a href="http://www.prepjet.de/about-1/contact-us/">get in touch</a> with PrepJet team.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*b1k4nZKRfHabnrDiGidfOA.jpeg" /></figure><p>But what is an outlier? In research, a definition by <a href="https://arxiv.org/ftp/cs/papers/0503/0503081.pdf">Hawkins (1980)</a> is widely referred to: An outlier is “an observation that deviates so much from other observations as to arouse suspicion that it was generated by a different mechanism.” What might that different mechanism be? For business data, flaws in manual data entry is a common source of error (e.g. we double press the 0-button when entering a price into the system). Data might be entered into in wrong units (e.g. miles instead of kilometers) or in different currencies.</p><p>In most cases, identifying an outlier is not as simple as finding an orange in a pile of green apples. The methods to detect outliers can be distinguished in statistical approaches, where a distribution of the data is known or at least estimated, and data mining techniques that do not have a certain underlying model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/365/1*zP1sJKW0XWgQ4UAUt6QC0w.png" /></figure><p>Statistical approaches are in most cases only viable for metric data (this means that the data you investigate is numeric, i.e. you can perform calculations with it such as an amount of money). In statistical (parametric) approaches, an outlier is identified when it deviates from the underlying model. Often, a normal distribution (see image) is assumed for the data set under investigation. A data point is marked as outlier when it lies within a certain distance (e.g. 3 standard deviations from the mean). This distance has to be defined by the analyst. A very simple method of analyzing a single variable for outliers is a box plot. The points above the upper extreme and below the lower extreme are considered outliers and have to be investigated by the analyst.</p><p>It is important to consider whether only a single variable is analyzed or if the dependence on other variables is considered. This is important when we work with a model that contains more than one variable that influence the variable we are interested in (i.e. the dependent variable). A value might fit well to the assumed distribution if we consider it in isolation, however, it might be suspicious when we consider its dependencies on other variables. For example, if we analyze pricing data for clothing catalogue, a price of 250 Euro might be plausible with respect to the overall distribution of prices. However, it might be suspicious if it is assigned to a pair of socks. This means that the price shows some association to the category of the elements of the product catalogue and it is important to consider this dependency when analyzing outliers.</p><p>Users who like more sophisticated analytical approaches can user data mining methods to detect outliers. An examples for such approaches is the k-Nearest-Neighbour algorithm that uses distance measures (e.g. Euclidean distance, Mahalanobis distance) to identify outliers. However, those approaches require a lot of calculation effort and often have long runtimes. Another method to find outliers is cluster analysis, In general, clustering algorithms group data points into clusters based on the values of other variables associated to the variable under investigation. For example, you can develop a customer segmentation based on sociodemographic data and purchase behavior with a clustering algorithm. For outlier detection, a cluster with a very small number of records is considered as outlier cluster. Some data mining approaches can also be used to detect outliers in categorical data.</p><p>While the detection of outliers can be automated using different algorithms, the handling of outliers requires domain expertise and should be performend by a human. The data analyst has to carefully decide whether to eliminate an outlier from the data set or not. Our best practice: First, try to clarify whether an error has occured in the data entry or measurement process. If this is not possible, eliminate only values that are certainly logically impossible (such as a person aged 400 years). A person aged 105 is not necessarily an data entry flaw — unless you are analyzing enrolment age of primary schools.</p><p>Need some help with your outliers? <a href="http://www.prepjet.de/about-1/contact-us/">We are happy to support!</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a35da658ef1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s trick Excel VLOOKUP: How to lookup lists with multiple criteria using INDEX and MATCH]]></title>
            <link>https://medium.com/@PrepJet/lets-trick-excel-vlookup-how-to-lookup-lists-with-multiple-criteria-using-index-and-match-aa8a615f11d?source=rss-44bf661ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa8a615f11d</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[excel]]></category>
            <category><![CDATA[data-preparation]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-integration]]></category>
            <dc:creator><![CDATA[PrepJet]]></dc:creator>
            <pubDate>Fri, 24 Jun 2016 19:14:00 GMT</pubDate>
            <atom:updated>2016-10-03T13:16:21.035Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*NYAmysWg8GJC_5rfoRdXuw.png" /><figcaption>Challenge: Combine data from different tables with more than one match criterion</figcaption></figure><p>Download our example file <a href="http://www.prepjet.de/2016/06/24/let-s-trick-excel-vlookup-how-to-lookup-lists-with-multiple-criteria-using-index-and-match/">here</a>.</p><h4>The challenge: lookups based on multiple search criteria</h4><p>When analyzing data, VLOOKUP is one of the most important functions in Microsoft Excel. It allows you to enrich your data with entries from another table using an exact identifier such as a name. The downside of MS Excel’s VLOOKUP is that it has significant limitations — particularly when you want to match values using multiple references.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*2r5B4TAsrRVVYYEN3sWfnA.png" /></figure><p>Let’s assume you have a list of customers that includes master data such as name, address, date of birth and contact information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*XyusW1bEhZlB_g0if9IKNA.png" /></figure><p>In an export file from your shop system, you have a list of all customers that made a purchase last moth including name, date of birth, the products they have purchased, and the total cart size of their purchase.</p><p>For a re-targeting campaign you want to send an email to all those customers, however your shop system file does not include the email address of your customers. VLOOKUP seems to be the solution to search for the customer in your master data table and pull the email address. Unfortunately, there is two John Smith in your table. And by chance, Lina Anderson and Mike Mitchell are born on exactly the same day! This is why VLOOKUP won’t work if you use either the name or the date of birth as lookup criterion. You need to perform a VLOOKUP using multiple conditions. Looking for both, customer name and date of birth, would solve the problem. However, VLOOKUP does not support using multiple search criteria. Here is a workaround for you!</p><h4><strong>A simple solution</strong></h4><p>If you don’t want to rack your brain with complicated formulas and slow calculations, you can simply use <a href="http://www.prepjet.de/sign-up-1/sign-in/">PrepJet Excel Plugin</a>. Even with the light version, you can easily match tables just in a few clicks using the “Lookup data” feature. There is also a dirty hack without PrepJet: You can simply create a new match criterion by concatenating several match criteria, to make the match criterion unique. Read more <a href="http://www.prepjet.de/2016/09/15/vlookup-how-to-combine-data-in-excel/#concatenate">here</a>.</p><h4>An advanced solution: Combine INDEX and MATCH functions in Excel</h4><p>If you are an advanced Excel power user, you can use can use a combination of different formulas to work around the VLOOKUP limitations. By combining the functions INDEX and MATCH you can define as many criteria as you want that have to match. The MATCH function helps you to create an array which is a sub-table of the data that fulfills your search criteria. If you are interested in the syntax first, have a look at the following section. Otherwise, you can skip and continue with the explanation.</p><h4>Syntax: INDEX, MATCHand combined function INDEX and MATCH</h4><p>Index Array function: =INDEX(table, row number, column number)<br>Output: Intersection between a row and a column</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*Nshz81VbjsdTpe5bMEWsUg.png" /></figure><p>Match function: =MATCH(search criterion, table, match type)<br>Output: Relative position of cell that matches your criteria</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*xQAaCH6wuHhUtNmwpN-Mrg.png" /></figure><p>Combined Index and Match function (array function):<br> =INDEX(table, MATCH(1, 1st search criterion * 2nd search criterion * … , match type), column number)<br>Output: Value in cell that matches all specified search criteria</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*hwM6hf88dqHieAEIe1vMkw.png" /></figure><h4>Explanation of the combined INDEX and MATCH function</h4><p>Let’s start with the MATCH function, the more complex part of the combined formula. With MATCH, you define the sub-table that contains only those rows that match your criteria. We recommend to implement the formula step by step. Download our example file above to see each formula separately.</p><p>The first argument is the match criterion, this is “1”. Why 1? We will learn this in a minute.</p><p>MATCH(1, …, …)</p><p>The second argument in MATCH defines the table in which to look for the match criteria. Here we use a trick to include multiple search criteria (in our case it’s two criteria: name and date_of_birth). We set the match criteria from our purchase table (in brackets) equal to the whole column in the master data table that contains the same attribute, in our case name resp. date_of_birth. All brackets defining your search criteria are multiplied using the asterisk.</p><p>MATCH(1,(A2=<em>MasterData!A:A</em>)*(B2=<em>MasterData!B:B</em>), …)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*1aWAVqdmgM11Wl04A3mFww.png" /></figure><p>What is happening here? MS Excel will tag all cells in which the first condition is true (i.e. the correct name is found) with a “1”, otherwise with a “0”. The same applies to the second condition. This means that the result of the multiplication of these two brackets will be “1” only in the cell in which both search criteria specified are met. This is why our match criterion in the first MATCH argument is “1”. The last argument of match is a 0 as you want to have an exact match (be careful with fuzzy matches in Excel! <a href="http://www.prepjet.de/2016/01/14/how-to-match-tables-without-unique-identifier-an-introduction-to-fuzzy-matching/">Read more about fuzzy matching</a>).</p><p>MATCH(1,(Purchase!A2=<em>MasterData!A2:A5</em>)*(Purchase!B2=<em>Master!DataB2:B5</em>),0)</p><p>Be careful: this is a so-called <a href="http://www.prepjet.de/resources/data-wiki/">array function</a>, which means simply pressing enter will not yield a result. To let Excel know that you wrote an array function, press CTRL+SHIFT+ENTER.</p><p>Now we integrate the MATCH into our INDEX function. The first argument in INDEX defines the table that contains your target information — in our example the email address. We select the whole MasterData table, including the email column.</p><p>=INDEX(<em>MasterDataA1:D4</em>, …, …)</p><p>As the second argument of the INDEX function, we define the row number of the entry we are looking for. This is where we insert the MATCH(), as it shows all rows for which both our search criteria are met (i.e. correct name and correct date of birth).</p><p>=INDEX(<em>MasterData!A2:D5</em>, MATCH(1,(Purchase!A2=<em>MasterData!A2:A5</em>)*(Purchase!B2=<em>MasterData!B2:B5</em>),0), …)</p><p>The last argument of our combined INDEX function is the number of the column that contains your target value. In our case this is 4 (you simply count from left to right). Our final function in the Purchase table looks as follows:</p><p>=INDEX(<em>MasterData!A2:D5</em>,MATCH(1,(Purchase!A2=<em>MasterData!A2:A5</em>)*(Purchase!B2=<em>MasterData!B2:B5</em>),0),4)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*hwM6hf88dqHieAEIe1vMkw.png" /></figure><p>Again, you have to press CTRL+SHIFT+ENTER to make the <a href="http://www.prepjet.de/resources/data-wiki/">array function</a> work.</p><p>Before extending your formula to the other cells below, do not forget to fix your absolute references using the “$” symbol:</p><p>=INDEX(<em>MasterData!$A$2:$D$5</em>,MATCH(1,(Purchase!A2=<em>MasterData!A$2:A$5</em>)*(Purchase!B2=<em>MasterData!B$2:B$5</em>),0),4)</p><p>Now you can simply drag the formula down (double-click on the bottom right corner to apply it to the whole column). This will add the email address for each row your purchase table. Depending on the size of your data set this might take a while. While waiting for your machine to be done, <a href="http://www.prepjet.de/2016/01/14/how-to-match-tables-without-unique-identifier-an-introduction-to-fuzzy-matching/">check out this post and learn more about the basics of fuzzy matching</a>.</p><p><em>Originally published at </em><a href="http://www.prepjet.de/2016/06/24/let-s-trick-excel-vlookup-how-to-lookup-lists-with-multiple-criteria-using-index-and-match/"><em>www.prepjet.de</em></a><em> on June 24, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa8a615f11d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to match tables without unique identifier: An introduction to fuzzy matching]]></title>
            <link>https://medium.com/@PrepJet/how-to-match-tables-without-unique-identifier-an-introduction-to-fuzzy-matching-3e6b99c19489?source=rss-44bf661ed5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3e6b99c19489</guid>
            <category><![CDATA[fuzzy-matching]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deduplication]]></category>
            <category><![CDATA[data-preparation]]></category>
            <dc:creator><![CDATA[PrepJet]]></dc:creator>
            <pubDate>Thu, 14 Jan 2016 14:25:00 GMT</pubDate>
            <atom:updated>2016-10-10T06:02:08.719Z</atom:updated>
            <content:encoded><![CDATA[<p>You have two tables, let’s say a customer list from your CRM system, and a list of leads to be targeted by your sales department. Of course, this lead list does not contain an identifier which would make it easy to match it with the CRM list and make sure you don’t contact the same organization twice. How can you solve this problem? It seems quite simple at the first glance. Common spreadsheet tools provide lookup features. However, company names are not always spelled exactly the same in both lists. For example, your CRM contains a customer called “Sun Incorporated”. However, in the lead list, this company is called “Sun Inc”. Lookup functions, however, usually do not find entries that are not exactly the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*94i5XsUfHzrQoaTwYpfTfA.jpeg" /></figure><p>You could find the non-exact matches by going through the list manually. If you have a small data set, this might be a viable option (yet not the most fun task…). As soon as your data set has a few thousand rows, however, this problem should not be addressed manually. It is not only a very strenuous and time-consuming task to identify duplicates with your eyes in large data sets. It is also prone to errors as you actually would have to compare each single pair of entries which is nearly impossible with bigger tables.</p><p>Fortunately, this problem can be solved with algorithms. Those algorithms are based on fuzzy rules. The term “fuzzy” refers to the deviations that these rules allow from a perfect match. A fuzzy rule could, for example, allow for two characters within a string variable (i.e. a text variable that does not have a numerical meaning such as a customer’s name) to be interchanged, such as “Cahtrine” instead of “Cathrine”. The closeness between two entries is usually measured by a similarity function. If this function exceeds a predefined threshold (which we call “c”) then the two entries are flagged as a match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DP9GjW5xbe1faygzPbkyJA.png" /></figure><p>One challenge of developing a fuzzy matching algorithm is to find meaningful similarity functions and fuzzy matching rules. There are hundreds of possible fuzzy rules that could be considered to find matches. One rule could be based on similarity considering characters which are “neighbors” at the keyboard and thus are likely to be interchanged by the person entering the data point. But also translations to other languages or similar meanings should be very close to each other. It could also be any kind of different abbreviation rules and all combinations of neighbor characters in a word that could be interchanged by the person entering the word. This is why fuzzy matching algorithms require vast computational capacities, particularly when big data sets are analyzed. It is another challenge to define the algorithms as smart as possible in order to make run time as short as possible.</p><p>Therefore, it is helpful to define fuzzy matching rules that consider the domain and the data generation process of the data under investigation. For user-generated data, it is in general important to consider the keyboard and its language. For product data, the fuzzy matching algorithm should not be case sensitive as products are often entered by a lot of different persons or parties who are used to different conventions.</p><p>Where it really becomes complex, is company names. Did you know, for example, that the German automotive company “BMW” is actually called “Bayerische Motorenwerke”? A generic algorithm will hardly find the acronym and the full company name similar.</p><p>Another use case for fuzzy matching algorithms is to remove duplicate entries from a database. If the entries match exactly, it is not hard to identify them even with common spreadsheet tools such as Microsoft Excel. However, when you want to delete duplicate entries e.g. from a list of customers, your can use fuzzy matching routines to identify those duplicate entries.</p><p>If you want to read more technical stuff about fuzzy matching, we recommend this paper by Microsoft Research: Chaudhuri et al. (2003): <a href="https://www.microsoft.com/en-us/research/wp-content/uploads/2003/01/bm_sigmod03.pdf">Robust and Efficient Fuzzy Match for Online Data Cleaning</a></p><p><em>Originally published at </em><a href="http://www.prepjet.de/2016/01/14/how-to-match-tables-without-unique-identifier-an-introduction-to-fuzzy-matching/"><em>www.prepjet.de</em></a><em> on January 14, 2016.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3e6b99c19489" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>