Introduction — Formulas Are Not Everything

Have you ever used the XLOOKUP function to search for customer information, only to get a #N/A error? Even though, when you manually check the table, the information you are looking for is actually there.

Or perhaps you have used SUMIFS to calculate total sales, but the result does not match the expected amount.

In many situations, our first assumption is that something is wrong with the formula. We might try replacing it, adding IFERROR, combining several functions, or even searching for a more advanced formula.

But have you ever considered that the problem might not be the formula itself, but the data you are working with?

For example, the customer name may contain hidden spaces, numbers may be stored as text, date formats may be inconsistent, or the same name may be written in several different ways.

These issues may seem minor. However, they can affect data lookup, calculations, grouping, and even the accuracy of the reports we produce.

Microsoft Excel provides hundreds of powerful formulas and features. However, even the most advanced formulas have limitations. They process data according to the instructions and conditions we provide.

A powerful formula does not automatically produce accurate analysis when the source data is unreliable.

1. Why Is Data Quality So Important?

In data processing, Data Quality is one of the most important foundations.

Before using data for calculations, analysis, or reporting, we need to ensure that it meets several essential quality characteristics.

Here are six important characteristics of high-quality data.

A. Accuracy

Data should correctly represent actual facts or conditions.

For example, a sales transaction records a product price of $150, while the actual price is $175.

The SUM or SUMIFS function can calculate the total correctly based on the available data. However, the final result will still be incorrect because the source value is inaccurate.

B. Consistency

Data with the same meaning should follow consistent formats and standards.

For example:

Customer Data

ABC Company

ABC Co.

ABC COMPANY

ABC Company

To a person, these entries may refer to the same company. However, Excel may treat them as different text values.

C. Completeness

Data should contain all the information required for processing.

For example, a transaction table may contain these columns:

  • Transaction ID

  • Date

  • Customer Name

  • Product

  • Quantity

  • Price

If the transaction date or customer name is missing, reporting processes may be affected, particularly when those fields are used for lookups or grouping.

D. Structure

Data should be organized in a clear and consistent structure.

Ideally, each row represents one record or transaction, while each column represents one type of information.

Poorly structured data can make it difficult to use formulas, PivotTables, and Power Query.

E. Uniqueness

Data should not contain unnecessary duplicate records.

For example, if the same transaction is recorded twice, the total sales amount may become higher than the actual value.

However, not every record containing identical values is necessarily a duplicate. Two different transactions may have the same date, customer, and amount.

F. Standardization

Data should follow consistent standards for naming, formatting, and measurement units.

For example, transaction dates should use a consistent date format, while sales amounts should be stored as numbers rather than text.

These six characteristics are interconnected. Ignoring even one of them can reduce the quality of the resulting analysis.

2. Common Data Problems in Excel

In everyday work, data often comes from different sources, such as sales applications, accounting systems, customer databases, application exports, or manual data entry.

These different sources frequently introduce data quality problems.

Here are some of the most common issues.

A. Hidden Spaces

Consider the following examples:

Data 1

Data 2

Jakarta

Jakarta

David

David

Excel Mudah

Excel Mudah

At first glance, the data looks identical. However, one of the entries may contain additional spaces at the beginning or end.

For example, "Jakarta" is different from " Jakarta ".

To remove unnecessary spaces, we can use the TRIM function.

=TRIM(A2)

TRIM removes leading and trailing spaces and reduces repeated spaces between words to a single space.

B. Non-Printing Characters

Data copied from other systems or web pages may contain hidden characters that are not visible.

These characters can cause lookup and comparison operations to behave unexpectedly.

Use CLEAN:

=CLEAN(A2)

CLEAN removes most non-printing control characters from text.

For data copied from web pages, non-breaking spaces (CHAR(160)) may also need to be removed:

=TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," ")))

C. Numbers Stored as Text

One common problem is numbers being stored as text.

For example:

Value

Data Type

150000

Number

'150000

Text

250000

Number

'250000

Text

Numbers stored as text may cause calculation formulas to return unexpected results.

To convert text into numbers, use VALUE:

=VALUE(A2)

Make sure the source text follows a numeric format that Excel can recognize under the current regional settings.

D. Inconsistent Date Formats

Consider these examples:

  • 04/11/2026

  • 11/04/2026

  • 4 November 2026

  • 2026-11-04

Although these values may represent the same date, Excel may interpret some of them as text depending on their format and regional settings.

When dates are stored as text, sorting, period calculations, and monthly analysis can become problematic.

The solution is to convert the data into actual Excel date values and then apply a consistent date format.

E. Duplicate Records

Consider this customer table:

ID

Customer Name

C001

Andrew

C002

David

C003

Andrew

C004

Sarah

The name Andrew appears twice.

Is this a duplicate?

Not necessarily. If the customer IDs are different, they may represent two different customers with the same name.

Before removing duplicates, determine which column or combination of columns uniquely identifies a record.

F. Inconsistent Name Formatting

For example:

Source Data

Standardized

jakarta

Jakarta

JAKARTA

Jakarta

Jakarta

Jakarta

bandung

Bandung

Differences in uppercase and lowercase letters generally do not affect standard Excel lookups. However, they can reduce presentation consistency and complicate further data processing.

We can use PROPER:

=PROPER(A2)

Alternatively, use UPPER or LOWER when a specific letter format is required.

G. Blank Cells and Incomplete Data

Blank cells can create problems when data is used for averages, reports, or transaction completeness checks.

However, we need to distinguish between:

  • Information that is genuinely unavailable.

  • Information that has not yet been entered.

  • Information that is not applicable.

  • A zero value.

These four conditions have different meanings and should not always be treated in the same way.

H. Inconsistent Table Structures

For example, a transaction table may have multiple header rows, blank rows in the middle of the data, or several pieces of information stored in a single column.

This structure can make it difficult to use FILTER, PivotTables, and Power Query.

The solution is to maintain a consistent table structure, with one header row and one record per data row.

3. How Does Messy Data Affect Excel Formulas?

Data quality has a direct impact on formula results. Here are some common examples.

A. XLOOKUP Cannot Find the Data

Suppose we have the following customer table:

Code

Customer Name

C001

Andrew

C002

David

C003

Sarah

We then use this formula:

=XLOOKUP(E2,A2:A4,B2:B4,"Not Found")

If E2 contains C002, the formula returns David.

But what happens if the source data actually contains a hidden space, such as C002 ?

The formula may fail to find a match because the lookup value is not identical to the value in the source table.

The solution is to clean the source data first or create a helper column containing the cleaned values.

B. SUMIFS Returns an Unexpected Total

Suppose we have the following sales data:

Product

Sales

Laptop

5,000

Laptop

3,000

Laptop

2,000

Monitor

1,500

To calculate total Laptop sales:

=SUMIFS(B2:B5,A2:A5,"Laptop")

The result is 10,000.

However, if one product name contains additional characters or inconsistent spelling, that transaction may not be included in the calculation.

C. COUNTIFS Returns an Incorrect Count

Suppose we want to count transactions with the status Paid.

=COUNTIFS(C2:C100,"Paid")

If some records use PAID, Paid , or Paid -, the result may differ from the actual number of transactions we intend to count.

Standardizing categories and statuses is essential for consistent calculations.

D. UNIQUE Displays Apparently Identical Values

Consider the following data:

Name

Andrew

David

Andrew

Andrew

Sarah

Use this formula:

=UNIQUE(A2:A6)

If one of the Andrew entries contains additional spaces, Excel may treat it as a different value.

Therefore, it is better to clean the data before using UNIQUE.

E. PivotTables Create Inconsistent Groups

PivotTables are extremely useful for creating reports and analyzing data.

However, if product categories are written in different formats, PivotTables will display them as separate groups.

For example:

  • Laptop

  • LAPTOP

  • Laptop

  • laptop

As a result, the report may show several categories even though they actually refer to the same product.

The key point is that formulas can work exactly as instructed, but still produce misleading information when the source data is problematic.

4. Clean Your Data Before Processing It

Before using complex formulas, it is a good idea to perform Data Cleaning.

Microsoft Excel provides several formulas and features that can help clean and standardize data.

Here are some of the most useful ones.

Formula / Feature

Purpose

TRIM

Removes unnecessary spaces

CLEAN

Removes non-printing control characters

SUBSTITUTE

Replaces specific characters

VALUE

Converts text into numbers

TEXT

Converts numbers or dates into formatted text

PROPER

Capitalizes the first letter of each word

UPPER

Converts all text to uppercase

LOWER

Converts all text to lowercase

Combining Formulas to Clean Data

Suppose we receive customer names containing excessive spaces and hidden characters.

We can combine several functions:

=TRIM(CLEAN(SUBSTITUTE(A2,CHAR(160)," ")))

This formula performs three operations:

  1. SUBSTITUTE replaces non-breaking spaces with regular spaces.

  2. CLEAN removes non-printing control characters.

  3. TRIM removes unnecessary spaces.

The result is cleaner and more consistent text.

Using Remove Duplicates

If the data contains genuine duplicate transactions, Excel provides a feature called Remove Duplicates.

Steps:

  1. Select the data table.

  2. Open the Data tab.

  3. Select Remove Duplicates.

  4. Choose the columns used to identify duplicates.

  5. Click OK.

Keep in mind that this feature removes records from the source data. It is advisable to create a backup before using it.

Using Text to Columns

Text to Columns is useful for separating multiple pieces of information stored in a single column.

For example:

Andrew,Jakarta,Finance

The data can be separated into three columns:

Name

City

Department

Andrew

Jakarta

Finance

You can find this feature under the Data tab by selecting Text to Columns.

Using Power Query

FIFA Data Cleaning Challenge. “Transforming a Messy Dataset: My… | by Heritage Odewale | Medium

If you work with large datasets or perform repetitive data-cleaning tasks, Power Query is one of the most useful tools available in Excel.

Power Query allows users to:

  • Remove unnecessary columns.

  • Remove blank rows.

  • Remove duplicates.

  • Change data types.

  • Replace specific values.

  • Combine multiple tables.

  • Split columns.

  • Standardize data formats.

One of the biggest advantages of Power Query is that transformation steps can be saved and applied again whenever the source data is updated.

This means you do not need to repeat the entire cleaning process manually every time you receive new data.

5. Building Good Data Management Habits

Data Cleaning should not only be performed when errors occur. Ideally, data quality management should become part of our daily working habits from the moment data is created.

Here are some practical recommendations.

A. Use Excel Tables

Convert your data into an Excel Table using the shortcut:

Ctrl + T

Excel Tables help maintain data structure, automatically expand references when new rows are added, and make formulas and PivotTables easier to manage.

B. Establish Data Entry Standards

Define consistent data entry standards from the beginning.

For example:

  • Use a consistent date format.

  • Follow a predefined product naming convention.

  • Use standardized transaction statuses.

  • Do not leave mandatory identification fields blank.

  • Enter quantities as numeric values.

C. Avoid Merged Cells in Source Data

Merged cells may make reports look more attractive, but they can complicate data processing.

In source tables, each column should have one header, and each row should represent one record.

D. Use Data Validation

Data Validation can restrict input values to predefined standards.

For example, a Status column may only allow these options:

  • Pending

  • Processing

  • Completed

  • Cancelled

This helps reduce spelling errors and inconsistent entries from the beginning.

E. Separate Raw Data from Processed Data

Keep the original data as your primary source.

Perform cleaning and transformation on a copy or through Power Query.

This practice helps preserve data integrity and makes it easier to investigate problems when errors occur.

F. Validate Data Before Creating Reports

Before creating a report, check the following:

  • Have all transactions been included?

  • Are there any duplicate records?

  • Are there missing values?

  • Are number and date formats correct?

  • Are all categories consistent?

  • Do the totals match the original source?

Simple validation can prevent errors that may have a significant impact on reports.

G. Document Transformation Processes

If data cleaning is performed regularly, document the steps involved.

This is particularly useful when data is managed by multiple people or when the same process needs to be repeated in subsequent reporting periods.

6. Conclusion — Better Data, More Accurate Analysis

Mastering Microsoft Excel formulas is an important skill. Functions such as XLOOKUP, SUMIFS, FILTER, UNIQUE, and various Dynamic Array functions can help us work faster and more efficiently.

However, knowing how to use formulas is not enough.

We also need to understand the characteristics of the data we are processing, identify potential errors, and ensure that the data meets acceptable quality standards.

Inaccurate, inconsistent, incomplete, or poorly structured data can produce misleading reports, even when every formula has been written correctly.

That is why Data Cleaning is not simply an additional task. It is an essential part of the Data Analysis process.

Before searching for a more complex formula, examine the data you are working with. The solution to your problem might not be a new formula, but simply data that needs to be cleaned.

Do not rush to find a more powerful formula when the data you have is not properly organized.

Excel is not just about how powerful the formulas we know are, but also about how well we understand the data we process.