Chapter-12: Data Analysis and Manipulation
Introduction
Data analysis and manipulation are essential for
making sense of raw data and deriving useful insights. This chapter will guide
you through limiting data appearance on the screen, working with text functions
for data cleaning, splitting and combining data, data normalization and
standardization, working with ranges and named ranges, conditional formatting,
data validation and error checking, using logical functions, and sorting and
filtering data. We will use simple language and include examples relevant to
India.
Limiting
Data Appearance on Screen
Freezing Panes
Freezing panes keeps specific rows or columns visible while you scroll through the rest of the worksheet.
1. Select the cell below the rows and to the
right of the columns you want to freeze.
2. Go to the View tab.
3. Click on "Freeze Panes" and choose
the desired option.
Example
To freeze the top row (headers) in a student marks sheet:
1. Select cell A2.
2. Go to the View tab.
3. Click on "Freeze Panes" >
"Freeze Top Row."
Hiding Rows and Columns
Hiding rows and columns helps focus on relevant data.
1. Select the rows or columns you want to hide.
2. Right-click and choose "Hide."
Example
To hide the column with Roll Numbers:
1. Select column B.
2. Right-click and choose "Hide."
Working with Text Functions for Data Cleaning
TRIM
The TRIM function removes extra spaces from text.
=TRIM(A1)
Example
If cell A1 contains " Rahul
", `=TRIM(A1)` will return "Rahul".
UPPER, LOWER, PROPER
- UPPER: Converts text to uppercase.
- LOWER: Converts text to lowercase.
- PROPER: Capitalizes the first letter of each word.
=UPPER(A1)
=LOWER(A1)
=PROPER(A1)
Example
If cell A1 contains "rahul kumar":
- `=UPPER(A1)` returns "RAHUL KUMAR".
- `=LOWER(A1)` returns "rahul kumar".
- `=PROPER(A1)` returns "Rahul Kumar".
Splitting
and Combining Data
Splitting Data
Use the Text to Columns feature to split data into separate columns.
1. Select the column with the data you want to
split.
2. Go to the Data tab.
3. Click on "Text to Columns."
4. Choose "Delimited" or "Fixed
Width" and follow the wizard.
Example
To split "Rahul Kumar" into separate columns:
1. Select the column with names.
2. Go to the Data tab.
3. Click on "Text to Columns" and
choose "Delimited."
4. Choose "Space" as the delimiter.
Combining Data
Use the CONCATENATE or `&` operator to combine data from multiple cells.
=CONCATENATE(A1, " ", B1)
=A1 & " " & B1
Example
If cell A1 contains "Rahul" and cell B1 contains "Kumar":
- `=CONCATENATE(A1, " ", B1)` returns
"Rahul Kumar".
- `=A1 & " " & B1` returns
"Rahul Kumar".
Data
Normalization and Standardization
Normalization
Normalization scales data to a specific range, usually 0 to 1.
=(A1 - MIN(A1:A10)) / (MAX(A1:A10) -
MIN(A1:A10))
Example
To normalize marks out of 100:
1. Select the range A1:A10.
2. Apply the formula: `=(A1 - MIN(A1:A10)) /
(MAX(A1:A10) - MIN(A1:A10))`.
Standardization
Standardization scales data to have a mean of 0 and a standard deviation of 1.
=(A1 - AVERAGE(A1:A10)) / STDEV(A1:A10)
Example
To standardize marks out of 100:
1. Select the range A1:A10.
2. Apply the formula: `=(A1 - AVERAGE(A1:A10)) /
STDEV(A1:A10)`.
Working
with Ranges and Named Ranges
Defining Named Ranges
Naming ranges makes formulas easier to understand.
1. Select the range of cells.
2. Go to the Formulas tab.
3. Click on "Define Name."
4. Enter a name and click "OK."
Example
To name the range A1:A10 as "Marks":
1. Select cells A1:A10.
2. Go to the Formulas tab.
3. Click on "Define Name" and enter
"Marks."
Using
Named Ranges in Formulas
Use named ranges in any formula.
=SUM(Marks)
Conditional Formatting
Applying Conditional Formatting
Conditional formatting changes the appearance of cells based on their values.
1. Select the cells to format.
2. Go to the Home tab.
3. Click on "Conditional Formatting."
4. Choose a rule type and define the rule.
Example
To highlight marks above 80:
1. Select the cells containing marks.
2. Go to the Home tab.
3. Click on "Conditional Formatting."
4. Choose "Highlight Cells Rules" >
"Greater Than."
5. Enter "80" and choose a format.
Data
Validation and Error Checking
Data Validation
Data validation ensures data entry is correct.
1. Select the cells to validate.
2. Go to the Data tab.
3. Click on "Data Validation."
4. Set the criteria.
Example
To allow only numbers between 0 and 100:
1. Select the cells where marks will be entered.
2. Go to the Data tab.
3. Click on "Data Validation."
4. Choose "Whole number" and set the
range to 0-100.
Error Checking
Error checking identifies and fixes errors in formulas.
1. Go to the Formulas tab.
2. Click on "Error Checking."
3. Follow the prompts to fix errors.
Using
Logical Functions
IF
The IF function returns one value if a condition is true and another value if false.
=IF(A1 > 50, "Pass", "Fail")
Example
To determine if a student passed:
1. Enter the formula: `=IF(A1 > 50,
"Pass", "Fail")`.
AND, OR
- AND: Returns TRUE if all conditions are true.
- OR: Returns TRUE if any condition is true.
=AND(A1 > 50, B1 > 50)
=OR(A1 > 50, B1 > 50)
Example
To check if a student passed both subjects:
1. Enter the formula: `=AND(A1 > 50, B1 >
50)`.
Sorting
and Filtering Data
Sorting Data
Sorting arranges data in a specific order.
1. Select the data to sort.
2. Go to the Data tab.
3. Click on "Sort."
4. Choose the sorting criteria.
Example
To sort students by marks:
1. Select the range A1:B10.
2. Go to the Data tab.
3. Click on "Sort."
4. Choose to sort by marks.
Filtering Data
Filtering displays only the data that meets specific criteria.
1. Select the data to filter.
2. Go to the Data tab.
3. Click on "Filter."
4. Set the filter criteria.
Example
To show only students who passed:
1. Select the range A1:B10.
2. Go to the Data tab.
3. Click on "Filter."
4. Set the filter to show only "Pass."
Conclusion
Data analysis and manipulation are vital for
making sense of raw data and deriving insights. By mastering these skills, you
can clean, organize, and analyze data effectively.
References
1. Microsoft Excel Documentation: [Microsoft
Excel Support](https://support.microsoft.com/en-us/excel)
2. Google Sheets Documentation: [Google Sheets
Help](https://support.google.com/sheets/)
3. LibreOffice Calc Guide: [LibreOffice
Documentation](https://documentation.libreoffice.org/en/english-documentation/)
4. Data Analysis Using Excel For Dummies by
Stephen L. Nelson
Comments
Post a Comment