Book
Book
A B D
Students' Detail
2 Roll No Name Age Activity sField Name
3 1 Armaan 12 Vocal Music
2 Chetan 11 Dance
Record 5 3 |David 12 |Chess
6 4 Farah 12 |Cricket
7 5
8
Harpreet 11
|Skating
6 |Jasleen 11 Vocal Music
Fig. 2.1 Asample of database
Adatabase has three main components which are described in the Table 2.1.
Table 2.1 Components of a database
Component Explanation
Field A field is a column that contains only one
type of data. For example,
Roll No., Name, Age, and Activity are different fields.
Record A record appears as a row in a database. It is
composed of two or more
fields. contains data and information about a person, an item, or an
It
organization. For example, 1, Armaan, 12, and Vocal Music together
form a record.
Field Name A field is considered a column in a database, therefore, field name is also
referred to as 'column label'. All the field names appear in a single row
above the data. A field can have only one field name. Each field name
must be unique. For example, Roll No, Name, Age, and Activity are
four different field names.
Suppose you have created a database in MS Excel, and now, you want to perform some
operations on it, such as adding, searching, deleting,and modifying a record. In a huge
database, it is always advisable to use the Form feature to perform such operations.
Using the Form' feature, you can work on an individual record ata time. Aform is asmall
screen that contains the fields of a database along with the space to add, modity, or view
a record.)A form also contains certain command buttons to perform various tasks. When
you enter or modify any information in aform, the data automatically gets updated in the
database.(Bydefault, the Form button is present on the Quick Access Toolbar.
Fig. 2.2 Sheetl dialog box Fig. 2.3 The blank form Fig. 2.4 Addinga new record
A B D
Students' Detail
Roll No Name Age Activity
nmnoo
3 1 Armaan 12 Vocal Music
4 2 Chetan 11 Dance
5 3 David 12 Chess Ava's Cool Tip »»)
4 Farah 12 Cricket on
6
While using aform, you can click
7 5 Harpreet 11 |Skating
6 Jasleen 11 Vocal Music the Find Prev and Find Next buttons
22
New
9 7 |Mahesh 11 Fine Art to access the previous and next
Record
records, respectively in the dotabase.
Fia. 2.5 New record added in the databose
Info Box >>>
To remove any unwanted duplicate value from the range, use the Remove Duplicates buton
available in the Data Tools group on the Data tab.
SEARCHING A RECORD
n adatabase,you can quickly search a specific record Sheet1 ? X
using the Form feature. To do so, follow these steps: Roll No: 6 of 7
1. Click anywhere in the database range, and
Name: |Jasleen New
click on the Formn button
Age: 11
Delete
2. The Sheetl dialog box appears. Click on the
Activity: Vocal Music Restore
Criteria button in the dialog box to search a
record by entering data in a uniquely identified Find Pre
field, such as Roll No. Find Next
3. In the Roll No text box, type 6 and Criteria
press Enter (Fig. 2.6).
Jose
If the entered value matches any record in the database,
then it will be displayed. Else, the first record will appear
in the form. Fig. 2.6 Searching a record
DELETING A RECORD
To delete a record using the Form feature, follow these steps:
1. Click on the Form button. The Sheetl dialog box appears.
2. Go to the desired record by using the Find Prev or Find Next buttons.
3. Once you reach the record to be deleted, click on the Delete button. Excel prompts
a confirmation box (Fig. 2.7).
4. Click on OK to delete.
Microsoft Excel X
Cancel
25
Fig. 2.7 Warning message
Nore:|Remember, once a record is deleted from the datagbase, it cannot be recovered.
SORTING DATA
MS Excel allows you to rearrange the data numerically or alphabetically, and on the basis of
dote, color, and so on. Rearranging data in a specific order is called sorting.
sort the data, i.e. A2:F7. Fig. 2.8 Sample database for sorting
3. Click on the Data tab. Review View 9 Tell me what you want to do..
Formulas Data
From Table
Refresh
Properties
1 Sort Filter LReapply
Sort & Filter group (Fig. 2.9). Jew
Jery L Recent Sources
Get & Transform
All- Edit Links
Connections
tAdvanced
Sort & Fiiter
5. The Sort dialog box appears (Fig. 2.10). Fig. 2.9 Selecting Sort button
Under the Column section, click on
the Sort by drop-down arrow. Select the column or field name on the basis of
which you wish to sort the data. Here, we have selected the Name field.
In the Sort On drop-down list, Values option is selected by default.
In the Order drop-down list, select the A to Z option.
selected. Activating this
Note: Make sure that My data has headers checkbox is
list.
option shows the 'Field names' in the Column Sort by drop-down
(Fig. 2.11). You willobserve that the
6. Click on OK. The sorted database will appear
in Name field is sorted in alphabetical order, i.e. from A to Z. The data in the
data
rest of the cells changes, accordingly.
? X
Sort
Add Level Delete Level Copy level Options.. M My data has headers
Coumn Sort On Order
Sort by Total Values Largest to Smalet
Cancel
4. Click on OK. The sorted database appears (Fig. 2.13). You will observe that the dato
in Total field is sorted in descending order, i.e., from Largest to Smallest.
Notice, the text values in column B, i.e. Name, are no more arranged in
alphabetical order.
Sort ?
1 Interschool Sports Tournament
School X
Delete Level V My data has headers
2 Sport Position Winner AL Add Level E Copy Level Options..
Fig. 2.14 Sample database for mutiple columns sorting Fig. 2.15 Specifying conditions for multiple sorting
Under the Column section, click on the Sort by drop-down arrow. Selec the
Sport option in the list.
In the Sort On section, Values option is selected by default.
selected,
In the Order section, make sure that A to Z is selected. If it is not
27
then select it.
below the tirst one
Click on the Add Level button. A new criteria row appears
(Fig. 2.15).
Under the Column section, in the BC
Then by field, select the Position 1
Interschool Sports Tournament
2 Sport PositionWinner
option.
In the Order section, select the
3 Badminton
4 Badminton
Farhan
Aditi
School
KV
5 Badminton m
Harleen
DAV
Smallest to Largest option. 6Chess
KV
1 Dolma
Click on OK. Observe, the data DAV
7Chess 2 Vasu DPS
of Sport column will be arranged 8Chess 3 Varun KV
9 Skating 1
Rajdeep DAV
in alphabetical order, and the data 10 Skating Megha |DPS
of Position column will be arranged 11 Skating 3 Neha DPS
in ascending order (Fig. 2.16). Fig. 2.16 Data sorted according to multiple columns
FILTERING DATA
MS Excel lets you display the records which meet certain criteria and conditions specified
by you. Ittermporarily blocks or hides the unwanted data from being viewed. This feature is
called Filtering. MS Excel provides two Filter commands:
Filter: lt is used for simple criteria.
Advanced: It is used for specifying complex criteria.
To apply simple criteria to filter data, follow these steps:
1. Create a database (Fig, 2.17) and select any cell within the range Al:F6.
2. Click on the Data tab.
3. Click on the Filter button in the Sort & Filter group. Notice, small drop-down arrows
appear at the bottom right of each column header indicating that 'Filtering' feature is
enabled (Fig. 2.17). Each arrow contains conditions to fiter the selected field.
File Home Insert Page Layout Formulas Data Review Vieu 9 Tell me vhat you want to do.
hFrorm Access ShowQueries I Connections 1 Z4Ciet
FromWeb From Tabie BPropert1s Resouy
From Other Existing Ne
bFrom Tet Query LoRecent Sources
Refresh | Sort e Advanced Calumns
Sources Connections Al. dit Links
Get External Data Get & Transform Connetions Sort & Filter
A Roll No
A B D E
Roll No Name Maths Science.Computer. Total
2 1 Harleen 76 90 80 246
3 2 |Daisy 50 56 77 183
4 3 Fatima 80 89 90 259
5 Bhavesh 49 56 65 170
6 5 Shiv 98 86 85 269
Tet Fiters
4 Tet Filters
Search
5 Selet AIn Search
DBhavesh 5
6 Daisy Bhavesh
Fatima
Harleen 6 Dovy..
Fatima
7 Shiw Haieen
7 UShiv
8 8
Cancel
Cancel
Fig. 2.18 Name column Filter drop-down list Fig. 2.19 Applying Filter
Excel filters the list and displays only the records that met the specified condition, i.e.
the records related to Bhavesh and Fatima (Fig. 2.20).
A
Roll No
B
Name Maths Science
E F
Computer. Total
Ava's Cool Tip »»>
Row number Fatima 80 89 90 259 Youcan access the Sort & Filter
turned blue 5 Bhavesh 49 56 65 170 button from the Editing group of
Fig. 2.20 Filtered result the Home tab.
Removing Filter
To remove the filter, follow these steps:
On the Data tab, click either on the Clear button Clear or Filter button Filter
in the
Sort & Filter group.
OR
Click on the Filter button next to the Name field (the filtered field) in figure 2.20. Select 29
eiher the Clear Filter From "Name" option or tick the Select All checkbox in the
drop-down menu.
Custom Filtering
The Custom Filter feature is used to
quickly filter data based on certain conditions.
you wantto display the records where Total marks are 'greater than or equal to 200, but
Custom Filter feature
Suppose, M
'less than or equal to 300'. In such a situation, you can use the to
1. Create a database (Fig. 2.21) and assume that filter is applied to the range A1:F&
fe
B C D E
er
1 Roll No Name Maths ScienceComputer. Total
90 80 246
fo
2 1 Harleen 76
50 56 77 183 to
3 2 Daisy
4 3 Fatima 80 89 90 259
5 Bhavesh 49 56 65 170
6 5 Shiv 98 86 85 269
To
Fig. 2.21 Sample database for custom filtering
Excel displays only those records that satisfy the Fig. 2.22 Selecting the Custom Filter option
specified condition (Fig. 2.24).
Custom AutoFilter
X
Show rows where:
Total
Filter
Reapply Remove Duplicates Relati
| Sort Text to
Advanced Columns Data ValidationMana
Sort & Filter
Data Validation..
Circle Invalid Data
Clear Validation Circles
5. The Data Validation dialog box appears (Fig. 2.27). By default, the Settings tab is
selected. Define the following:
Click on the Allow drop-down arrow and Data Validation ?
select the Text length option. (By default, Settings Input Message
Validation criteria
Error Alert
Define the following: Fig. 2.27 Defining validation criteria for fields
Valid data.
Inthe Title text box, type
between 5 and 10.
In the Input message box, type enter
the following:
7. Click on the Error Alert tab (Fig. 2.29). Define
In the Style drop-down menu, select the Warning option.
In the Title text box, type Invalid data.
In the Error message box, type Incorrect input. Click on OK.
Data Validation X Data Validation
?
Settings Input Message Error Alert Settings Input Message Error Alert
Show input message when cell is selected
MShow error alert after invalid data is entered
When cell is seleted, show this input message: When user enters invalid data, show this
error alert:
Iitke: Style:
Valid data
Iitle:
Warning Invalid data
Input message:
enter between 5 and 10 Error message:
Incorret input
Invalid data X
Incorret input
Continue?
2 Yes No Cancel Help
Fig. 2.31 Warning message
Flashback
Exercises
A. Tick (/) the correct answers.
1. This is an organized collection of information.
a. Database b Chart C. Sorting
database along with the space to add,
2 It is a small screen that contains the fields of a
modify, or view a record.
b Form C. Frame
a. Worksheet
34