0% found this document useful (0 votes)
14 views

Unit-3 Gathering and Processing Data For Reports

Uploaded by

SURYA SUMEET
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Unit-3 Gathering and Processing Data For Reports

Uploaded by

SURYA SUMEET
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Gathering and Processing Data for Reports

Objectives
In this chapter, you will learn to:
Organize data

Process data

Organizing Data
Consider the scenario of Alpha Supermart. Recently, the company has expanded its business and
opened new stores at various locations in Philadelphia. Simon, the Finance Executive, is responsible for
maintaining all the records in the ledger books. It has become a tedious task for him to maintain such
voluminous data manually, as they are cluttered. In order to maintain the data effectively and
efficiently, he needs to organize the data in the required order and format.

Arranging Data in Tabular Form


Consider a scenario where the employee details, such as Employee ID, Employee Name, Address, and
Mobile Number, of 500 employees are recorded. These details are stored in the form of a bulleted list or
paragraph. Storing the details in this form adversely affects the clarity of data. A rectangular array of
rows and columns provides an efficient structure for holding and managing the data. Moreover, it
enables effective analysis. Therefore, it is necessary to arrange the data in a tabular format. The
structure of a workbook is such that it allows you to arrange data in a tabular format. In addition, it
allows you to view data in different ways by using the following features:

Sort

Filter

Group

Using the Sort Feature


Consider the scenario of Alpha Supermart. John, the Sales Officer, creates a worksheet, which
contains the details of sales revenue generated from 250 customers valued at $1.5 million during
May. In this scenario, if you need to know the days with the minimum and maximum sales in
May, you need to sort the data in the ascending order. Sorting is a method that allows the user to
order data. The textual data can be arranged in the alphabetical or reverse-alphabetical order. The
numeric data can be arranged in the ascending or descending order. In addition, you can sort data
on single criterion or on multiple criteria.

Sorting can be done on multiple columns by using the Custom Sort feature. You can apply this
feature by using the Sort dialog box, as shown in the following figure.

You can also use the preceding dialog box to refine the sort with additional filters, such as cell
color or values, by using the Sort On drop-down list. In addition, you can specify the order in
which you can arrange the data. For example, a worksheet contains the details of the members of
a fitness club, such as Member ID, First Name, Last Name, Gender, Address, Contact Number,
and Plan ID. You can sort the data in the worksheet on Plan ID of the members in the ascending
order. In addition, you can apply another level of sorting on the basis of First Name of the
members. Data in a worksheet can also be sorted by using the custom list feature. Microsoft
Excel has the following default custom lists:

 Abbreviated days: It includes Sun, Mon, Tue, Wed, Thu, Fri, and Sat.

 Days: It includes Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.

 Abbreviated months: It includes Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, and
Dec.

 Months: It includes January, February, March, April, May, June, July, August, September,
October, November, and December. In addition, you can create your own custom list, on the
basis of which, data can be sorted.

Sorting the Data in a Workbook (Example)


.2: Sorting the Data in a Workbook Using Custom Sort
Prerequisite: To perform this task, you need to use the MemberDetails.xlsx workbook. To sort
the data in a workbook using custom sort, you need to perform the following steps:

1. Open the SupplierDetails.xlsx workbook.

2. Select the B1cell.

3. Click the Sort & Filter drop-down button in the Editing group under the Home tab. The

drop-down list is displayed.

4. Select the Sort A to Z option. The data in the SupplierDetails.xlsx workbook will be

displayed, as shown in following figure.

5. Save and close Microsoft Excel workbook.

Sorting the Data in a Workbook Using Custom Sort (Example)


To sort the data in a workbook using custom sort, you need to perform the following steps:

1. Open the MemberDetails.xlsx workbook.

2. Select the A1:G101cell range.

3. Click the Sort & Filter drop-down button in the Editing group under the Home tab. The
drop-down list is displayed.

4. Select the Custom Sort option. The Sort dialog box is displayed, as shown in the following
figure.

5. Select the Plan ID option in the Sort by drop-down list.

6. Ensure that the Values option is selected in the Sort On drop-down list.

7. Ensure that the Smallest to Largest option is selected in the Order drop-down list.

8. Click the Add Level button in the Sort dialog box. A new level of sorting is added as shown

in the following figure.


9. Select the First Name option from the Then by drop-down list.

10. Ensure that the Values option is selected in the Sort On drop-down list.

11. Ensure that the A to Z option is selected in the Order drop-down list.

12. Click the OK button. The data in the MemberDetails.xlsx workbook will be displayed, as
shown in the following figure.

5. Select the Month of Joining option in the Sort by drop-down list.


6. Ensure that the Values option is selected in the Sort On drop-down list.

7. Select the Custom List option in the Order drop-down list. The Custom Lists dialog box is
displayed, as shown in the following figure.

13. Save and close the Microsoft Excel workbook.

Sorting the Data in a Workbook Using Custom Lists(Example)


To sort the data in a workbook using custom lists, you need to perform the following steps:

1. Open the StaffDetails.xlsx workbook.


2. Select the A1:D26cell range.
3. Click the Sort & Filter drop-down button in the Editing group under the Home tab.
4. The drop-down list is displayed. Select the Custom Sort option. The Sort dialog box is
displayed, as shown in the following figure.

8. Select the January,February,March,April option in the Custom Lists list box.

9. Click the OK button.

10. The data in the StaffDetails.xlsx workbook will be displayed in order of their month of

joining, as shown in the following figure.


11. Save and close the Microsoft Excel workbook.

Using the Filter Feature


Consider a scenario of a bookstore named Mindfreak. Vaughan, the Store Manager, records the
book details, such as the book name, author name, book category, and price, in a worksheet. In
this worksheet, Vaughan wants to view the details of the books in the Fiction category. As the
amount of data in the worksheet is large, Vaughan finds it difficult to search the books in the
Fiction category. Therefore, to view the details of the Fiction category books, he needs to apply a
filter on the Category column. The following figure shows the book details after applying the
filter.
Filtering is a method of viewing the data that meets the specified criteria. It hides the remaining
information, which makes it easier for the user to interpret the data. It basically isolates specific
data on the worksheet. It is different from sorting as it does not reorder the data. Instead, it hides
the data that does not meet the filter criteria. Filter can be applied by selecting the Filter option
in the Sort and Filter drop-down button under the Home tab. In the preceding scenario,
Vaughan viewed the details of the books in the Fiction category. In addition, he wants to view
the fiction books priced between $150 and $200. For this purpose, multiple filtering criteria need
to be applied. This can be achieved by using the custom filter feature. This feature is applied by
using the Custom AutoFilter dialog box, as shown in the following figure.
The Custom AutoFilter dialog box is displayed by clicking the filter drop-down arrow in the
column in which filter is applied, and then selecting the Custom Filter option under Text Filters
or Number Filters. In the Custom AutoFilter dialog box, you can select the conditions from
the drop-down lists on the left and the values of the columns from the drop-down lists on the
right. These conditions on the columns are applied by using the logical AND and OR criteria.
The custom filter feature on numeric data is applied by selecting the following conditions:

 Equals: This condition filters the numeric data in the worksheet by filtering the details, which
correspond to the selected value.

 Does Not Equal: This condition filters the numeric data in the worksheet by filtering the
details, which do not correspond to the selected value.

 Greater Than: This condition filters the numeric data in the worksheet by filtering the
details, which correspond to the values greater than the selected value.

 Greater Than or Equal To: This condition filters the numeric data in the worksheet by
filtering the details, which correspond to the values greater than or equal to the selected value.

 Less Than: This condition filters the numeric data in the worksheet by filtering the details,
which correspond to the values less than the selected value.

 Less Than or Equal To: This condition filters the numeric data in the worksheet by filtering
the details, which correspond to the values less than or equal to the selected value.

The custom filter feature on the text data is applied by selecting the following conditions:

 Begins With: This condition filters the text data in the worksheet by filtering the details,
which correspond to the values that begin with the specified characters.

 Ends With: This condition filters the text data in the worksheet by filtering the details, which
correspond to the values that end with the specified characters.

 Contains: This condition filters the text data in the worksheet by filtering the details, which
correspond to the values that contain the specified characters.

 Does Not Contain: This condition filters the text data in the worksheet by filtering the details,
which correspond to the values that do not contain the specified characters.

 Equals: This condition filters the text data in the worksheet by filtering the details, which
correspond to the selected value.

 Does Not Equal: This condition filters the text data in the worksheet by filtering the details,
which do not correspond to the selected value.
Filtering the Data in a Workbook (Example)
Prerequisite: To perform this task, you need to use the ProductsDetails.xlsx workbook. To
filter the data in a workbook, you need to perform the following steps:

1. Open the ProductsDetails.xlsx workbook.

2. Select the C1 cell.

3. Click the Sort & Filter drop-down button in the Editing group under the Home tab. The
drop-down list is displayed.

4. Select the Filter option.

5. Click the drop-down button in the C1 cell. The drop-down list is displayed.

6. Clear the (Select All)check box.

7. Select the 3 check box.

8. Click OK button. The data in the ProductsDetails.xlsx workbook is displayed, as shown in


the following figure.
9. Save and close the Microsoft Excel workbook.

Using the Group Feature


Consider a scenario of Delta Green Furniture. The sales department of the company creates
reports for the sales of their products on a daily basis. Nick, the General Manager, wants to see
the sales figure for each quarter. For this purpose, he uses the grouping feature in Microsoft
Excel, which helps him group the sales details so that the daily sales figures are combined to
form the data for each quarter. The data stored in the worksheet can be grouped together in the
form of a number of rows or columns, forming the different levels or groups. Grouping the data
helps to summarize it. It is useful to add groups to the data so that a user need not go through
each and every cell data to look for a value. Rather, a data value can be traversed by looking into
the group containing the cell. The outline for each group can be done on the basis of rows, as
well as on the basis of columns. The outline of each group is displayed in outline pane. You can
select a range of rows or columns and group them into one level. Grouping can be applied on
numeric data, as well as on non numeric data. The following figure shows the outline pane.
Grouping the Data in a Workbook (Example)

Prerequisite: To perform this task, you need to use the DivisionSales.xlsx workbook. To group
the data in a workbook, you need to perform the following steps:

1. Open the DivisionSales.xlsx workbook.

2. Select the A4:E7cell range.

3. Click the Data tab.

4. Click the down arrow of the Group drop-down button in the Outline group. The drop-down
list is displayed.

5. Select the Group option. A Group dialog box is displayed.

6. Ensure that the Row option selected.


7. Click the OK button.

8. Select the A10:E13 cell range.

9. Repeat the steps 4 to 7.

10. Select the A16:E19 cell range.

11. Repeat the steps 4 to 7.

12. Select the A22:E25 cell range.

13. Repeat the steps 4 to 7.

14. Select the A28:E31 cell range.

15. Repeat the steps 4 to 7.

16. After grouping, the data in the DivisionSales.xlsx workbook is displayed, as shown in the
following figure.
16. Click all the minus symbols in the outline pane. The DivisionSales.xlsx workbook is
displayed, as shown in the following figure.
17. Save and close the Microsoft Excel workbook.

Formatting Data
Consider a scenario where you are creating a workbook to track the monthly travel expense of
employees of a company. You want to ensure that in the expense column, only that data is
accepted, which exceeds $2500 per person. To accomplish this, you need to use the data
validation feature. In addition, you also want to highlight the rows that have the expense amount
greater than $5000. To accomplish this, you need to use the conditional formatting feature.

Data Validation
The data validation feature of Microsoft Excel allows you to create certain rules that dictate what
can be entered into a cell. For example, you may want to limit the data entry in a particular cell
to a number ranging 10 to 100. If a user tries to enter an invalid value, you can display a custom
error message. Data validation can be implemented in two ways:

By preventing the user from entering invalid data in cells.


By encircling the invalid data in cells.

Preventing the User from Entering Invalid Data(Example)


Prerequisite: To perform this task, you need to use the BookSales.xlsx workbook. To prevent
the user from entering invalid data, you need to perform the following steps:

1. Open the BookSales.xlsx workbook.

2. Select the D3:D16 cell range.

3. Click the Data tab.

4. Click the down arrow of the Data Validation drop-down button in Data Tools group. The
drop-down list is displayed.

5. Select the Data Validation option. The Data Validation dialog box is displayed, as shown in
the following figure.

6. Ensure that the Settings tab is selected.


7. Click the Allow drop-down list. The drop-down list is displayed.

8. Select the Whole Number option.

9. Click the Data drop-down list. The drop-down list is displayed.

10. Select the greater than option.

11. Type -1 in the text box below the label Minimum.

12. Click the Error Alert tab.

13, Type Invalid Input in the Title text box.

14. Type Enter positive value in the Error message text box.

15. Click the OK button.

16. Save and close the Microsoft Excel workbook.

Encircling Invalid Data in the Cells(Example)


Prerequisite: To perform this task, you need to use the SalaryDetails.xlsx workbook. To
encircle invalid data in the cells, you need to perform the following steps:

1. Open the SalaryDetails.xlsx workbook.

2. Select the C4:J23 cell range.

3. Click the Data tab.

4. Click the down arrow of the Data Validation drop-down button in Data Tools group.

5. The drop-down list is displayed. Select the Data Validation option. The Data Validation
dialog box is displayed, as shown in the following figure.
6. Ensure that Settings tab is selected.

7. Click the Allow drop-down list. The drop-down list is displayed.

8. Select the Decimal option.

9. Click the Data drop-down list.

10. The drop-down list is displayed. Select the greater than option.

11. Type -1 in the Minimum text box.

12. Click the OK button.

13. Click the down arrow of the Data Validation drop-down button in Data Tools group under
the Data tab. The drop-down list is displayed.

14. Select the Circle Invalid Data option. The data in the SalaryDetails.xlsx workbook is
displayed, as shown in the following figure.
15. Save and close the Microsoft Excel workbook.

Conditional Formatting

Consider the scenario of Alpha Supermart. The product details, such as the product name,
product category, unit price, and reorder quantity, are recorded in a worksheet. Abraham, the
Store Manager, wants to identify the products whose unit price is less than $500. For this
purpose, he can use the conditional formatting feature of Microsoft Excel, which will highlight
the cells that have the unit price less than $500. Conditional formatting highlights those cells,
whose data satisfy certain criteria, with some style to distinguish them from other cells. In
Microsoft Excel, the cells to be formatted may contain numeric or textual data. There are
different types of conditional formatting criteria, which can be applied on data:

 Highlight Cell Rules: This type of conditional formatting is used to highlight the cells that
satisfy the predefined criteria, such as Greater Than, Less Than, Equal To, Text that Contains, A
Date Occurring, and Duplicate Values.
 Top/Bottom Rules: This type of conditional formatting is used to highlight the cells with a
specified color or format, when their values satisfy the criteria, such as Top 10 items, Top 10%,
Bottom 10 items, Bottom 10%, Above average, and Below average.

 Data Bars: This type of conditional formatting is used to distinguish each selected cell by
placing a bar corresponding to the value in the cell.

 Color Scales: This type of conditional formatting is used to distinguish each selected cell by
coloring with a range of colors selected in the color scale.

 Icon Sets: This type of conditional formatting is used to distinguish each selected cell by
placing an icon corresponding to the value of the cell. There are different types of predefined
icon sets, such as Directional, Shapes, Indicators, and Ratings.

Moreover, you can create your own conditional formatting criteria by using the New Formatting
Rule dialog box, as shown in the following figure.
To open the New Formatting Rule dialog box, you need to first click the Conditional
Formatting drop-down button under the Home tab, and then select the New Rule option. In the
New Formatting Rule dialog box, you can choose a rule from the Select a Rule Type section.
Based on your selection, you can set the format options that you want to apply on the cell
content. You can also delete the rules, which you have created, by using the Clear Rule option
in the Conditional Formatting drop-down button in the Home tab.

Applying the Conditional Formatting(example)


Prerequisite: To perform this task, you need to use the FirstQtrSales.xlsxworkbook.
To apply the conditional formatting, you need to perform the following steps:

1. Open the FirstQtrSales.xlsx workbook.

2. Select the B3:D35 cell range.

3. Click the Conditional Formatting drop-down button in the Styles group under the Home tab.
The drop-down list is displayed.

4. Select the Highlight Cells Rules option. A list is displayed.

5. Select the Greater Than option. The Greater Than dialog box is displayed.

6. Type 9000 in the text box below Format cells that are GREATER THAN.

7. Click the with drop-down list. The drop-down list is displayed.

8. Select the Green Fill with Dart Green Text option.

9. Click the OK button. The data in the FirstQtrSales.xlsx workbook will be displayed, as
shown in the following figure.
10. Save and close the Microsoft Excel workbook.

Performing Basic Calculations


To process data by performing basic calculations in a worksheet, you can use formulas or some
built-in functions, such as Sum and IF. While performing calculations, you may need to refer to a
single cell or multiple cells using the cell referencing feature. You can also assign meaningful
name to a cell or range of cells.
Cell Referencing
The formulas and functions can be applied on the data stored at different locations in the same
worksheet or in different worksheets. To refer to this data from different locations, Microsoft
Excel provides a feature known as cell referencing. A reference is the address of a cell or a range
of cells in a worksheet. By using cell referencing, you can refer to the data of various cells in a
formula. You can also refer to the values in the worksheets of the same workbook or of some
other workbooks. References to other workbooks are known as links. Some commonly-used
referencing methodologies in Microsoft Excel are:

Relative referencing

Absolute referencing

Mixed referencing

 3-D referencing

Relative Referencing In relative referencing, when the position of the cell containing
the formula changes, the reference also changes. For example, you have the cell, C3, with a
formula that references A3 and B3. When you copy the formula from C3 to C4, Microsoft Excel
updates the cell reference from A3 to A4 and B3 to B4 inside the formula, respectively, as shown
in the following figure.

Absolute Referencing
In absolute referencing, the cell references contained in the formula does not change even if you
copy the formula to another location. You can use absolute referencing in a formula by prefixing
the column name and the row number by the dollar ($) sign. For example, to refer to the cells,
A3 and B3, absolutely in C4, specify the cell names as $A$3 and $B$3. Thereafter, copy the
formula from C3 to C4. The reference used in the formula does not get changed, as shown in the
following figure.

Mixed Referencing
This referencing methodology uses both, relative referencing and absolute referencing. It has
either an absolute column and a relative row or an absolute row and a relative column. For
example, you have the cell, C3, with the formula that references A3 relatively and B3 absolutely.
Now, when you copy the formula from C3 to C4, the relative reference will change but the
absolute reference will remain the same, as shown in the following figure.
3-D Referencing
This referencing methodology refers to the same cell or range of cells in multiple worksheets. To
understand 3-D referencing better, consider a scenario where you have created a workbook that
contains worksheets for sales of every month. The B4 cell contains the total sales of a month in
each worksheet. Now, you want to find the total sales of the first quarter in the new worksheet,
Quarter_1. For this, you need all the total sales values of January, February, and March. You can
use 3-D referencing to add all the cell references of three sheets. To refer the cell references of
three sheets, you need to click the January worksheet tab, hold the Shift key, and then click the
March worksheet tab. The following figure shows the 3D referencing formula.

Defined Name
A defined name can be used to describe the meaning or content of a cell, range of cells, constant,
or formula by giving it a definitive name. You can define range names on the cells in order to
perform the operations in a more convenient manner, rather than using a cell name of each
individual cell in the calculations. You can use the defined names wherever you want to use the
actual cell address or the content. For example, the formula, =A10 * B10, is not meaningful
unless you know the meaning of the data in the cells, A10 and B10. However, if you assign
names to A10 as Income and B10 as TaxRate, you can write the formula as =Income *
TaxRate. You can assign name to a cell or range of cells by using Define Name button in
Formulas tab.

Defining a Range Name by Using the Define Name


Option(Example)
Prerequisite: To perform this task, you need to use the DefineName.xlsx workbook. To define a
range name using New Name dialog box, you need to perform the following steps:
1. Open the DefineName.xlsx workbook.

2. Select the B3:B6 cell range.

3. Click the Formula tab.

4. Click the down arrow of Define Name drop-down button in the Defined Names group. The
drop-down list is displayed.

5. Select the Define Name option. The New Name dialog box is displayed, as shown in the
following figure.

6. Type qtr_1 in the Nametext box.

7. Click OK button.

8. Select the C3:C6 cell range.

9. Repeat the steps from 3 to 6. However, refer qtr_1as qtr_2.


10. Select the D3:D6 cell range.

11. Repeat the steps from 3 to 6. However, refer qtr_1as qtr_3.

12. Select the E3:E6 cell range.

13. Repeat the steps from 3 to 6. However, refer qtr_1as qtr_4.

14. Select the B8 cell and type the formula =SUM(qtr_1,qtr_2,qtr_3,qtr_4) then press the
Enter key.

15. Save and close the Microsoft Excel workbook.

You might also like