Employee Worksheet — Practical Exercise
Fields: Eno, Ename, Designation, Salary, Date_of_joining
Sample Record (use as one of the records):
Eno | Ename | Designation | Salary | Date_of_joining (dd/mm/yyyy) |
---|---|---|---|---|
1101 | Kriya Kapoor | Manager | 75,500 | 12/08/2022 |
Task
- Add at least 10 records in the worksheet with the fields: Eno, Ename, Designation, Salary, Date_of_joining. Use the sample record above as one of them.
- Find out the most experienced and least experienced employee.
- Apply Blue color to the most experienced employee’s entire record (row).
- Apply Red color to the least experienced employee’s entire record (row).
- Filter records to show only employees whose Date_of_joining is between 01/05/2019 and 31/08/2023 (inclusive).
- Sort the records designation-wise (group by Designation) and calculate subtotal of Salary for each Designation.
- Draw a Pie Chart that displays Designation (categories) vs Total Salary (values) — i.e., salary subtotal per designation.
- Format the header row (make it clear & visible — e.g., bold with background color) and freeze the top row so headers remain visible when scrolling.
- Protect the sheet from unauthorized editing (apply sheet protection / password as appropriate).
Solution — Employee Worksheet (Step-by-step)
Software: OpenOffice / LibreOffice Calc (Excel notes included).
Dataset (paste this into A1:E11)
Eno | Ename | Designation | Salary | Date_of_joining (dd/mm/yyyy) |
---|---|---|---|---|
1101 | Kriya Kapoor | Manager | 75500 | 12/08/2022 |
1102 | Rohan Singh | Clerk | 25000 | 01/05/2019 |
1103 | Neha Patel | HR Executive | 42000 | 15/07/2020 |
1104 | Amit Verma | Developer | 55000 | 25/03/2021 |
1105 | Priya Mehta | Accountant | 38000 | 11/12/2018 |
1106 | Sanjay Rao | Clerk | 24000 | 05/09/2023 |
1107 | Kavita Shah | Developer | 60000 | 10/01/2020 |
1108 | Arjun Das | Manager | 80000 | 20/06/2017 |
1109 | Sneha Joshi | HR Executive | 46000 | 14/04/2022 |
1110 | Raj Malhotra | Developer | 57000 | 30/11/2019 |
Step-by-Step Tasks (Students follow these in Calc)
-
Ensure Dates are real Date values
- Select columnE
→ Format → Cells → Date → choose DD/MM/YYYY (or your locale).
(If dates paste as text, use Data → Text to Columns or use DATEVALUE to convert.) -
Calculate Experience (years & months)
- In cellF1
write header Experience.
- InF2
put (Calc / OpenOffice style uses semicolons; Excel uses commas):
=DATEDIF(E2; TODAY(); "Y") & " yrs " & DATEDIF(E2; TODAY(); "YM") & " mos"
Drag/copy down F2:F11.
Excel version (comma separators):=DATEDIF(E2, TODAY(), "Y") & " yrs " & DATEDIF(E2, TODAY(), "YM") & " mos"
-
Most experienced (earliest Date) & Least experienced (latest Date) — apply Blue/Red row color
Goal: color the entire row A:E — Blue for most experienced (earliest join date), Red for least experienced (latest join date).- Create two cell styles (optional but cleaner): Press F11 → New Style from selection → name them MostBlue (set blue fill + white text) and LeastRed (set red fill + white text).
- Select range A2:E11 (the data rows).
- Format → Conditional → Condition 1 → set Formula is and enter:
$E2 = MIN($E$2:$E$11)
Then choose Apply Style = MostBlue (or Format… set blue background). - Click Add (Condition 2) → Formula is:
$E2 = MAX($E$2:$E$11)
Apply Style = LeastRed.
-
Filter employees joined between 01/05/2019 and 31/08/2023
Method A — Standard Filter (Calc):- Select the data range A1:E11.
- Data → Filter → Standard Filter.
- Set: Field = Date_of_joining, Condition = >=, Value = 2019-05-01 (or type
2019-05-01
); - Click the + (Add) and set second row Field = Date_of_joining, Condition = <=, Value = 2023-08-31 ; Operator = AND → OK.
- In
G1
write header InRange. - In
G2
enter (Calc semicolons):
=AND($E2 >= DATE(2019;5;1); $E2 <= DATE(2023;8;31))
Drag down. - Then Data → Filter → AutoFilter and choose TRUE in column G to show only those rows.
Result (from the sample): Rohan Singh, Raj Malhotra, Kavita Shah, Neha Patel, Amit Verma, Sneha Joshi, Kriya Kapoor (7 records).
-
Sort Designation-wise & calculate salary subtotal per designation
Recommended: Pivot Table (clean & chart-ready)- Select A1:E11 (include headers).
- Data → Pivot Table → Create → Current Selection → OK.
- In the Pivot Table layout: drag Designation to Row Fields and Salary to Data Fields (Function = Sum).
- Finish: You will see each designation and Sum of Salary.
Subtotals (from sample):
Alternate: Sort the main sheet by Designation (Data → Sort) then use Data → Subtotals (if available) to insert subtotal rows.
Accountant = 38,000
Clerk = 25,000 + 24,000 = 49,000
Developer = 55,000 + 60,000 + 57,000 = 172,000
HR Executive = 42,000 + 46,000 = 88,000
Manager = 75,500 + 80,000 = 155,500
Total = 502,500 -
Draw a Pie Chart of Designation vs Total Salary
- Use the Pivot Table result (Designation & Sum of Salary). Select those two columns.
- Insert → Chart → Chart type = Pie → Next/Finish.
- Right-click chart → Insert Data Labels → choose value & percentage if you like.
- Resize & move chart to a suitable place (or copy chart to a new sheet and Export as image for WordPress upload).
-
Format header row & Freeze top row
- Select row1
→ Format → Rows → Height (optional).
- Format → Cells → Font → Bold; Background color (light grey); Alignment → Center (for headings).
- View → Freeze Rows and Columns → Freeze First Row (so headers stay visible while scrolling). -
Protect the sheet from unauthorized edits
- Tools → Protect Sheet → set a password (remember it!). Choose what users may still do (select cells, format cells, etc.).
- To encrypt the workbook file so it cannot be opened without password: File → Save As → check Save with password (enter password when prompted).
Excel note: Review → Protect Sheet and File → Save As → Tools → General Options → Password to open (for encryption).
Submission checklist for students
- Upload the workbook file (.ods) with applied conditional formatting and chart.
- Include screenshots showing: colored rows (blue & red), filtered result, pivot/subtotal screen, pie chart, and proof of protected sheet.
- Alternatively, submit a PDF export containing the same screenshots and the .ods file as attachment.