Cell Formulas

advertisement
Dates, Sorting, and Payroll
Table of Contents
Open and Save File ________________________________________________________________ 1
Dates____________________________________________________________________________ 1
Create Formula Using Dates ________________________________________________________________ 1
Completed Worksheet _____________________________________________________________________ 4
Cell Formulas ___________________________________________________________________________ 4
Sorting __________________________________________________________________________ 5
Sort Ascending __________________________________________________________________________ 5
Multiple Sort ____________________________________________________________________________ 7
Page Setup for Sort Worksheet – Print Row Titles _______________________________________________ 9
Completed Worksheet ____________________________________________________________________ 13
Payroll _________________________________________________________________________ 14
Calculate Gross Pay _____________________________________________________________________ 14
Calculate Total Deductions ________________________________________________________________ 15
Calculate Net Pay _______________________________________________________________________ 16
Completed Worksheet ____________________________________________________________________ 17
Cell Formulas __________________________________________________________________________ 17
Documentation Worksheet ________________________________________________________ 18
Insert a Worksheet ______________________________________________________________________ 18
Create Documentation Page _______________________________________________________________ 19
Completed Worksheet ____________________________________________________________________ 20
Cell Formulas __________________________________________________________________________ 20
Page Setup for Documentation, Dates, and Payroll Worksheets __________________________ 21
Save and Exit Excel ______________________________________________________________ 24
Formulas
Dates, Sorting, and Payroll
Open and Save File
1. Open the file: Formulas
2. Save as: Formulas – Your Name
a. Save to Jump Drive
b. Computer
3. There are three worksheets: Dates, Sort, and Payroll.
Dates
Two dates can be subtracted. When those dates are subtracted, it will be displayed as a date. It
will be necessary to format the date as a number – the cells can be formatted before you create
the formula or after you have created the formula. Once the formula has been formatted, it can
be used in additional formulas (ex: number of days in a hotel room and the room rate, number of
days a book is overdue and the overdue fine, number of days a car has been rented, etc.).
Create Formula Using Dates
1. Select the Dates Sheet Tab (if necessary).
2. Select E5.
3. Enter the formula: =C5 – D5 and press ENTER.
CISM 2201
Formulas
Page 1
4. The formula will be displayed as a date.
5. Format as a Number.
a. Right mouse click E5.
b. Select Format Cells.
Subtracting a date from a
date will give you a date.
Right mouse click the cell
and select Format Cells to
format the cell as a Number.
CISM 2201
Formulas
Page 2
c. Choose Number.
i. Decimal Places: 0
ii. Format for negative in red parentheses (fourth option).
iii. Click OK or press ENTER to return to the worksheet.
Format E5 for
Number, zero
decimal places, and
format for negative
numbers. Click OK
or press enter to
return to the
worksheet.
6. Use the Fill Handle to copy the formula to E7.
Use the Fill
Handle to
copy the
formula.
CISM 2201
Formulas
Page 3
Completed Worksheet
Cell Formulas
Dates are displayed as
a five-digit number.
CISM 2201
Formulas
Page 4
Sorting
There will be times when it is necessary to sort your data. On the Standard Toolbar there are
icons for Sort Ascending and Sort Descending. Use Sort Ascending and Sort Descending with a
single sort – one column is sorted.
To sort more than one column, use the Data Menu, select Sort, and select the columns to be
sorted. In the bottom left-hand corner, select a Row Header or No Row Header.
Sort Icons on the Standard Toolbar
Sort Ascending
Sort Descending
Sort Ascending
1. Select the Sort sheet tab.
2. Select B5.
3. Click the Sort Ascending icon on the Standard Toolbar.
CISM 2201
Formulas
Page 5
You will notice in rows 17-20 that using Sort Ascending does not alphabetize the first names.
Instead, we will create a multiple sort – sort up to three columns. For the multiple sort, we will
sort by Zip, Last Name, and First Name.
Perform a
multiple sort
alphabetize
by Zip, Last
Name, and
First Name.
CISM 2201
Formulas
Page 6
Multiple Sort
1. Click Undo (if it does not work, that’s OK).
2. Select B5.
3. Select the Data Menu and choose Sort.
CISM 2201
Formulas
Page 7
4.
5.
6.
7.
Click the Sort by drop-down arrow and select Zip.
Click the Then by drop-down arrow and select Last Name.
Click the Then by drop-down arrow and select First Name.
Click Header row. Click OK or press ENTER to return to the worksheet.
Click the Sort by dropdown arrow and select Zip.
Click the Then by dropdown arrow and select
Last. Click the Then by
drop-down arrow and select
First. The data range has a
Header row. Click OK or
press ENTER to return to
the worksheet.
A sorted worksheet is displayed on page 12.
CISM 2201
Formulas
Page 8
Page Setup for Sort Worksheet – Print Row Titles
With this example, the text will print on two pages. Because of this, you want the titles (rows 14) to repeat. This is accomplished in Page Setup, selecting the Sheet tab, clicking the icon for
Repeating Rows, and selecting the rows that will print on all pages for the Sort worksheet.
1. Click the File Menu and choose Page Setup.
2. Click the Header/Footer tab and choose Custom Footer.
CISM 2201
Formulas
Page 9
3. Add the Custom Footer.
a. Left Section: Type your first and last name, Online.
b. Center Section: Type: Sort, press ENTER, and click the Path & File Icon.
c. Left Section: Click the Date Icon, press the space bar ONCE, and click the Time Icon.
d. Click OK.
Date and
Time Icons
Path and
File Icon
4. Click the Sheet tab.
5. Click the icon for Rows to Repeat.
Click to
select the
rows.
CISM 2201
Formulas
Page 10
6. Click and drag to select Rows 1-4. Press ENTER or click the Icon to return to the Sheet tab.
Click and
drag to
select rows
1-4. Press
ENTER or
click the
icon to
return to
Page Setup.
7. Click Gridlines and Row and Column Headings.
8. Click OK or press ENTER to return to the worksheet.
Rows to repeat
Click Gridlines
and Row/Column
Headings.
Click OK or
press ENTER.
9. Click Print Preview to view the two pages.
CISM 2201
Formulas
Page 11
We are not going
to center vertically
or horizontally.
Page 1
Page 2
10. Click Close.
CISM 2201
Formulas
Page 12
Completed Worksheet
This is a portion of the sorted list. There are no cell formulas (no formulas or functions).
CISM 2201
Formulas
Page 13
Payroll
In this example, we will create a formula to calculate Gross Pay that includes Regular Pay and
Overtime Pay. Regular Pay is Pay Rate * Hours (up to 40). Overtime Pay is Pay Rate * OT
Rate * OT Hours. Because Regular Pay and OT Pay are combined, we will put each in
parentheses. Normally, we would calculate the deductions; however, those are provided. Net
Pay is the difference between Gross Pay and Total Deductions.
Calculate Gross Pay
1. Select the Payroll sheet tab.
2. Select E5.
3. Enter the formula for Gross Pay and press ENTER.
a. =(Regular Pay) + (Overtime Pay)
i. =(C5*B5)+(D5*B5*B11 and press F4)
ii. =(C5*B5)+(D5*B5*$B$11)
CISM 2201
Formulas
To make a cell
absolute, press the
Function 4 (F4) key.
Page 14
4. Select E5 and use the Fill Handle to copy the formula.
Calculate Total Deductions
There are three deductions. We will use the AutoSum Icon to calculate Total Deductions.
1. Select I5.
2. Click the AutoSum icon ONCE.
CISM 2201
Formulas
Page 15
3. Click and drag to select F5:H5.
4. Press ENTER.
5. Select I5 and use the Fill Handle to copy the formula.
Calculate Net Pay
1. Select J5.
2. Enter the Net Pay formula and press ENTER.
a. =Gross Pay – Total Deductions
b. =E5-I5 and press ENTER.
3. Select J5 and use the Fill Handle to copy the formula.
CISM 2201
Formulas
Page 16
Completed Worksheet
Cell Formulas
CISM 2201
Formulas
Page 17
Documentation Worksheet
There is not a worksheet for the Documentation page. We will insert a worksheet and create the
Documentation page.
Insert a Worksheet
We need to insert a worksheet to create the Documentation Page.
This can be done two ways:
1. Select the Insert Menu and choose Worksheet.
2. Right mouse click a sheet tab, select Insert, and choose Worksheet.
1. Select the Dates Sheet Tab.
2. Select the Insert Menu and choose Worksheet.
3. Double Click the sheet tab and type: Documentation
4. Press ENTER
CISM 2201
Formulas
Page 18
Create Documentation Page
We will link the title in A1 from the Sort Worksheet.
1. Click the Documentation Sheet Tab.
2. Select A1.
3. Press =
4. Click the Sort Sheet Tab.
5. Click A1.
6. Press ENTER.
7. Click and drag to select A1:B1. Click the Merge and Center Icon.
8. Select A3 and type: Author:
9. Select B3 and type: Your First and Last Name
10. Select A5 and type: Date:
11. Select B5 and enter the today function: =today() and press ENTER.
12. Click B5 and click the Align Left Icon.
13. Select A7 and type: Purpose:
14. Select B7 and type: Create worksheets for customers.
Enter the today
function, =today()
and press ENTER.
CISM 2201
Formulas
Page 19
15. Position the mouse between Column Heading B and Column Heading C. When you get a
two-headed arrow, double click to widen Column B.
16. Select A1. Hold down the CTRL key and select A3, A5, and A7. Release the CTRL key.
Click the Bold icon.
Completed Worksheet
Cell Formulas
CISM 2201
Formulas
Page 20
Page Setup for Documentation, Dates, and Payroll Worksheets
1. You should be in the Documentation Worksheet. Hold down the CTRL key.
2. Click the Dates Sheet Tab. Click the Payroll Sheet Tab.
3. Release the mouse. The worksheets will be grouped.
Grouped
4. Select the File Menu and choose Page Setup.
5. Select the Margins Tab. Click Horizontally and Click Vertically.
6. Click the Header/Footer Tab.
CISM 2201
Formulas
Page 21
7. Click the Custom Footer Tab.
8. Left Section: Type: Your First and Last Name, Online
9. Center Section: Type: Formulas, Press ENTER, and click the Path & File Icon.
10. Right Section: Click the Date Icon, press the space bar once, and click the Time Icon.
11. Click OK.
Date and
Time Icons
Path and
File Icon
12. Select the Sheet Tab.
CISM 2201
Formulas
Page 22
13. Click Gridlines and click Row and Column Headings.
14. Click OK or press ENTER.
15. Right mouse click the Documentation Sheet Tab.
16. Click Ungroup Sheets.
Before you save and/or print your work, always use the Print Preview to make sure your Page
Setup worked. After you Print Preview, click the Close Icon.
CISM 2201
Formulas
Page 23
Save and Exit Excel
1. Click the Save Icon.
2. Select the File Menu and choose Exit.
CISM 2201
Formulas
Page 24
Download