DEV Community

Cover image for Getting Started with Excel for Data Analytics: From Basics to Data Cleaning.
MERCY MUMBI WAHOME
MERCY MUMBI WAHOME

Posted on

Getting Started with Excel for Data Analytics: From Basics to Data Cleaning.

Introduction

When I began my journey into data science and analytics, Excel was one of the first tools I encountered. Week 1 changed my perspective by showing me that Excel is much more than a platform for entering and storing information. It can be used to organize, validate, transform, and prepare data for meaningful analysis. In this article, I explore the fundamental Excel concepts I learned and apply them to an HR dataset containing employee information. I demonstrate how to work with an Excel workbook, understand cells and data types, navigate the Ribbon and Home tab, use functions and operators, and identify common data-quality problems.
The main focus is data cleaning, since reliable analysis begins with reliable data. Using the HR dataset, I demonstrate how seemingly small inconsistencies—such as incorrect formatting, duplicate records, missing values, inconsistent text, and invalid dates; can affect the quality of information produced from a dataset. The process therefore moves from understanding Excel → entering and examining data → identifying problems → cleaning the data → preparing it for analysis.

What is Excel

Microsoft Excel is a spreadsheet application used to organize, calculate, analyze, and present data. It provides a structured environment in which information can be stored in rows and columns, with each intersection forming a cell. For data analytics, Excel is particularly useful because it combines data storage with tools for calculations, filtering, sorting, visualization, and data cleaning. It also provides functions that can transform raw information into useful insights. My first important realization was that good analysis does not begin with immediately calculating results. It begins with understanding the data and ensuring that the data is accurate, consistent, and suitable for analysis.
To begin working with Excel, I installed and opened Microsoft Excel on my computer. When Excel opens, it provides options for creating a new workbook or opening an existing one. An Excel workbook is the main file that contains one or more worksheets. A worksheet is the individual spreadsheet where data is entered and manipulated. Each worksheet consists of rows, columns, and cells. A cell can contain different types of information, including text, numbers, dates, percentages, and currency values. Recognizing these data types is important because Excel handles each type differently. For example, a date should be stored as a date rather than ordinary text if I want to sort dates chronologically or perform calculations involving time.

Exploring the Excel Interface

Excel organizes its tools through the Ribbon, which appears at the top of the workbook. The Ribbon contains tabs such as Home, Insert, Page Layout, Formulas, Data, Review, and View, with each tab grouping related commands. The Home tab is especially useful when working with data. It contains options for formatting text and numbers, changing alignment, inserting or deleting cells, sorting and filtering data, and finding or replacing information. These features make it possible to improve both the appearance and quality of a dataset without leaving the worksheet. An Excel workbook also has several useful features, including multiple worksheets, formulas, functions, formatting tools, tables, sorting, filtering, and conditional formatting. Together, these features allow Excel to support the entire journey from raw data to analysis.

Data Entry and Understanding the Dataset

Data entry involves recording information into the appropriate cells while maintaining consistency in how the information is represented. For example, numbers should remain numerical, dates should use a consistent date format, and text should be entered consistently. For my practical exercise, I used the HR_Dataset_Dirty.xlsx dataset. It contains employee information such as Employee ID, names, department, salary, hire date, age, gender, performance score, work experience, employee type, location, and training hours. Before making any changes, I examined the dataset to understand its structure and identify possible data-quality issues.

Data Cleaning

Before cleaning the data, I made a copy of the original dataset. This is an important data-management practice because the original data should always be preserved in case I need to compare changes or recover information. I created a separate worksheet for the cleaned data and worked on the copy rather than altering the original dataset. This allowed me to distinguish between the raw data and the cleaned data.
Data cleaning is the process of identifying and correcting inaccurate, incomplete, inconsistent, or incorrectly formatted data. It is an essential stage of data analytics because poor-quality data can produce misleading results. While examining my dataset, I found several examples of these problems. For instance, employee names appeared with inconsistent capitalization, departments were represented in different ways, and some dates were invalid or inconsistently formatted.

Text Cleaning and Standardization

Text cleaning involves correcting inconsistencies in text so that similar information is represented in a uniform way. Common examples include inconsistent capitalization, extra spaces, spelling variations, and different labels referring to the same category. Excel provides several useful text functions for this. PROPER capitalizes the first letter of each word, UPPER converts text to uppercase, and LOWER converts text to lowercase. TRIM removes unnecessary spaces, while Find and Replace can be used to replace inconsistent words or labels throughout a dataset.
For example, the names JOHN, john, and JoHn represent the same person but have different formatting. Using PROPER standardizes them to John. Similarly, department labels such as HR, H.R, and Hr may need to be standardized to one consistent value. In my HR dataset, I identified inconsistent capitalization in the First Name column. Some names appeared entirely in uppercase while others were lowercase or mixed. I therefore applied the PROPER function to standardize the names.

Removing Duplicates

Duplicate data occurs when the same record, or an identifier that should be unique, appears more than once. Duplicates can distort analysis by causing certain employees or observations to be counted multiple times. Excel provides Remove Duplicates **under the **Data tab. Duplicates should be reviewed before deletion because two records may share one value while still representing different records. For my HR dataset, Employee ID is particularly useful for checking duplicates because it should uniquely identify an employee. We found repeated Employee IDs, so this gives us a real example of why duplicate checking is necessary.

Formatting and Data Types

Data formatting ensures that information is displayed consistently and that Excel recognizes each value according to its correct data type. Common types include text, numbers, dates, percentages, and currency. Correct data types are important because Excel performs calculations and sorting differently depending on how a value is stored. For example, a salary should be numerical so that it can be calculated, while a hire date should be recognized as a date so that employees can be sorted chronologically.
Common Excel tools for this include Number Format, Currency, Date, and Format Cells. In my HR dataset, I found inconsistencies in the Salary and Hire Date columns. Some salary values used different currency representations, while some dates were entered in different formats. I standardized these values so that the dataset would use consistent formats.

For valid dates, I standardized the display format so that all dates follow the same pattern.

Missing Values and Blank Cells

Missing data occurs when information expected in a dataset has not been provided. A blank cell and a zero should not automatically be treated as the same because a blank may indicate unavailable information, while zero can be a valid value depending on the field. Excel tools such as Filter, Find & Select, and functions such as COUNTBLANK can help identify missing values. For example, a missing salary or department requires investigation, while a project count of zero may be a legitimate record. In my HR dataset, I checked for blank values and considered the meaning of each field before deciding how the missing information should be handled. This approach helped ensure that cleaning my data did not introduce new errors by replacing meaningful values unnecessarily.

Find and Replace

This is used to locate a particular value or text and replace it with a consistent or corrected value. It is especially useful when the same inconsistency appears many times in a dataset. For example, HR, Hr, and H.R may all refer to the same department, but Excel treats them as different text values. In our HR dataset, we can standardize such department names using Find and Replace so that the same department has one consistent label. This improves filtering, grouping, counting, and later analysis.

Data Validity and Logical Checking

Data validity means checking whether values are reasonable and make sense within the context of the dataset. It involves checking whether values fall within an expected and reasonable range. In an HR dataset, age is a good example because employees would generally be expected to fall within the defined working-age range. For this exercise, I used 19 to 65 years as the acceptable range. Excel's logical functions, particularly IF, together with comparison operators such as >= and <=, can be used to identify values outside this range. This allows unusual records to be flagged for investigation rather than automatically deleted. Applying this check helps improve the reliability of the dataset before analysis.

Conditional Formatting

It is an Excel feature that automatically changes the appearance of cells when they meet a specified condition. It helps identify unusual values quickly without manually checking every record. For example, it can highlight high salaries, low performance scores, missing values, or unusually long work experience. In our HR dataset, I used conditional formatting to highlight employees with more than 25 years of work experience. This makes potentially unusual records easier to identify and investigate before analysis.

Operators and Functions
Excel uses operators and functions to transform and analyze data. Operators are symbols that tell Excel how to perform an operation or comparison. Arithmetic operators include addition, subtraction, multiplication, and division, while comparison operators include equal to, greater than, less than, greater than or equal to, less than or equal to, and not equal to. In my dataset, I applied PROPER for name standardization and used IF and AND to validate employee ages against the 19–65 range. I also used comparison operators to identify work experience exceeding 25 years. These examples demonstrated how functions and operators can turn simple spreadsheet values into useful data-quality checks.

Conclusion

My first week with Excel showed me that effective data analytics begins with clean, reliable data. By working with the HR dataset, I learned how to identify and correct inconsistencies, duplicates, missing values, formatting issues, and invalid information using Excel's tools and functions. Most importantly, I learned to look beyond the numbers and question the quality and meaning of the data before analysing it. This experience has given me a stronger foundation and greater confidence as I continue my journey in data science and analytics.

Top comments (0)