Excel Tips: Quick Fixes for Data Messes

Data Cleanup with Power Query

One of the first things you need to do when handling complex engineering problems in Excel is to ensure your data is clean and usable. Power Query is a great tool for this because it allows you to import data from various sources and clean it up efficiently.

Imagine you’re pulling tolerance data from a website into Excel. Power Query can help you transform this data into a structured format. You’ll need to remove unnecessary columns, split merged cells, and convert text to numeric values.

Removing Unnecessary Columns

In any engineering project, dealing with clean data is key. Often, datasets come with excess information that clutters your workspace and complicates analysis. Excel’s Power Query editor is a powerful tool for streamlining your data by removing unnecessary columns. For instance, if you’re working with tolerance data imported from the web, you might find columns that are irrelevant to your calculations.

In Power Query, removing these extra columns is easy. Simply right-click on the column header you want to eliminate and select “Remove.” This action declutters your data set and makes it easier to focus on the essential information needed for your calculations.

Splitting Merged Cells

Another common issue in data sets is merged cells, especially when importing data from external sources like web pages. Merged cells can disrupt the data structure, making it difficult to perform accurate analyses. Power Query offers a solution to split these merged cells into individual cells.

When you encounter a merged cell in your data, Power Query can identify and separate the merged content into distinct cells. This process often involves using the ‘Split Column’ feature, which allows you to divide the data based on a delimiter, such as a space or a comma and ensures that each piece of data occupies its own cell.

Converting Text to Numeric Values

Data imported from external sources can sometimes be in text format, even when it represents numerical values. For engineering calculations, having data in a numeric format is vital. Power Query facilitates the conversion of text to numeric values, enabling accurate and efficient calculations.

For example, numerical values misinterpreted as text can’t be used in mathematical operations until converted. Power Query’s ‘Change Type’ feature allows you to transform these text values into numeric ones easily.

Creating a Limits and Fits Calculator

After cleaning the data, you can use it to create a limits and fits calculator. A tool like this allows engineers and drafts the ability to quickly determine how to tolerance parts for various fits. By entering a diameter and selecting a fit, the calculator provides the appropriate tolerances.

In Excel, you can set up a calculator that uses data validation to ensure correct input values and employs lookup functions to find and display the right tolerances. For example, using the `XLOOKUP` function, you can search through the cleaned data to find and return the specific tolerance values needed for the given parameters.

While setting up the calculator, you might use data validation to restrict input ranges or ensure that inputs match the available data. This ensures accuracy and prevents errors during calculations.

Excel Formula Example:

=DROP(Shaft_Upper_Limits[Headers], 0, 1)

This formula uses the `DROP` function to exclude the first column header from the “Headers” array of the “Shaft_Upper_Limits” table so that only relevant fit options can be selected.

Excel Formula Example:

=XLOOKUP(diameter, Shaft_Upper_Limits[Diameter], INDIRECT(“Shaft_Upper_Limits[“&shaft_fit&”]”))

Here, `XLOOKUP` is used to find the tolerance based on the diameter, with `INDIRECT` allowing dynamic reference to the column name based on the selected fit, located in a cell.

Learn More Inside EngineerExcel Academy

To dive deeper into these topics and access a comprehensive guide on creating powerful Excel tools just like the one we discussed above, join EngineerExcel Academy. Inside the Academy, you can access the full Limits and Fits Calculator and Video Workshop, offering detailed step-by-step instructions and insights. Learn more and join at EngineerExcel Academy to enhance your Excel skills and take your engineering projects to the next level.

Scroll to Top
Complete... 50%
Please enter your name and email address below to receive a link to the toolkit.

You’ll also receive regular tips to help you master Excel for engineering.



By Charlie Young, P.E.

Take your engineering to the next level with advanced Excel skills.