19
Excel Author: Mr Rouén – Rougêt James STUDY GUIDE Grade 10 – 12 Computer Applications Technology EDITION 3 (2014)

Assets Grade 12 Excel Functions Explained

Embed Size (px)

DESCRIPTION

CAT Excel Functions

Citation preview

Page 1: Assets Grade 12 Excel Functions Explained

Excel Author: Mr Rouén – Rougêt James

STUDY GUIDE

Grade 10 – 12

Computer Applications Technology

EDITION 3 (2014)

Page 2: Assets Grade 12 Excel Functions Explained

Excel

Section A: Introduction to Excel WHAT IS EXCEL? Microsoft Excel is a spreadsheet program which allows one to enter numerical values or data into rows and columns of a spreadsheet, and to use these numerical entries for calculations, graphs, and statistical analysis.

WHAT IS A SPREADSHEET? A spreadsheet is a grid that organizes data into columns and rows. Calculations can be performed by inserting functions and graphs are added to enhance the readability of the data provided. TIPS AND GENERAL INFORMATION ON SPREADSHEETS

Rows increase downwards

Columns increase horizontally to the right.

Never type in a character to represent a certain value type: for example R for currency in rand. It doesn’t represent currency, but text. After data has been entered into your spreadsheet, then by using the format cells option, you change to data types to the correct cell references. This ensures that formulas work correctly and data is represented according to the correct data type and format.

The “Ctrl” + “~” key will preview all your functions created in your spreadsheet. Pressing it again will return you to your normal view.

Always design the layout of your spreadsheet first, before bordering cells, merging cells or wrapping text.

Use text alignment and orientation when creating headings for columns. Also use background colour, and font settings to make headings clearly visible.

When adding borders to cells, always choose the border style, line width and colour before choosing the borders to be added, this will ensure that the necessary options will be take into affect.

Every function starts with an equal sign “=”.

Wrap Text: This allows multiple rows within a cell which in turn keeps text within its cell boundaries.

Merge Cells: Selecting a number of cells and merging them into a single cell.

An Active Cell is the cell currently selected and the address is found in the Name Box.

The contents of the Active Cell are displayed in the Formula Bar. FORMATTING CELLS INTO CERTAIN DATA TYPES

Currency: Select the correct currency type (Rand for SA) and also the number of decimal places if needed.

Number: Integer or Real number with the selected amount of decimal places needed.

Text: All characters and numbers entered will be handled as text. Only text functions can be used with these values.

Date: Select the appropriate date format.

Time: Select the appropriate time format.

Page 3: Assets Grade 12 Excel Functions Explained

DIFFERENT DATA TYPES

Data type Examples Tips for typing

Numbers

1253.78 (Real) 36.8% (Percentage) R 13.48 (Currency) -2, -1, 0, 1, 2 (Whole numbers)

Numbers will be automatically displayed on the right side of the cell. There are different number formats. Change it the format you want, e.g. Currency, Percentage, General, etc. With percentages, the value displayed is not the real value. If the value 70% is displayed, the value 0.7 will be stored in the cell. Use a full stop when typing decimal places.

Text

ABC125 Chris 0004 0894934829

Text is normally displayed left in a cell. You may adjust the justification as desired. To display text underneath each other in one cell, Wrap Text must be used. Can add more lines by using “ALT” + “Enter”

Date

07/04/2009 dd/mm/yyyy 07-Apr-2009 dd-mmm-yyyy 7 April 2009 d mmmm yyyy

You can specify in which format you want the date to display. <Ctrl><:> displays the current date. d – 7 dd – 07 m – 4 mm – 04 mmm – Apr mmmm – April yy – 09 yyyy - 2019

Time 08:00 2:40 PM 23:30:56 hh:mm:ss

You can specify the format the time must be displayed in. By default, time such as 03:00 or 09:00 is accepted to be AM. <Ctrl><Shift><:> displays the current time.

Page 4: Assets Grade 12 Excel Functions Explained

MATHEMATICAL OPERATORS

- for subtraction

* for multiplication

/ for division

$ constant (absolute referencing)

> larger than

< less than

>= greater or equal

<= less or equal

<> not equal

= equal

^ (caret) Symbol used to raise a number to a power Example: =2^4 = 2 X 2 X 2 X 2 = 16

ERROR INDICATORS

ERROR indicator Likely cause of error Possible solutions to fix the error

#######

The column is not wide enough to display a number stored in the cell.

Widen the column. Reduce the font size. Use a different number format.

#VALUE!

References are made to cells in the formula where the data type cannot be used in a calculation. Example: You want to multiply a cell containing text with a number.

Check the cell references. Check the data types.

#DIV0! Occurs when division by zero is attempted. A blank cell is viewed as a zero value.

Change the number to another value than zero. Refer to cells which contain values.

#NAME?

The function name used is not recognized by excel. Example: AVERAGE not AVG.

Check the spelling of the function. Place text in inverted commas. E.g. =IF(A3 = “seniors”,”too old”,”too young”) Place a colon within range referencing, E.g. (A3:A12)

#REF! Appears when excel encounters a cell reference in a formula which is no longer valid.

Use the Undo option immediately after the message is shown. This usually remedies the problem.

#NUM!

Occurs when you use an invalid numerical value in a function that requires a numerical value as one of its arguments. Example: You attempt to calculate the square root of a negative number.

Ensure that numerical values are valid for the calculations for which they are being used.

Page 5: Assets Grade 12 Excel Functions Explained

Cell Referencing CELL ADDRESS A single cell address is given by the column and row number. E.g. A1 will be in column A, row 1. RANGE A range refers to a group of cells which has been highlighted, selected or used within a function.

Selected cells Range

(B3:C7)

(A3:E3)

(B3:B11)

Page 6: Assets Grade 12 Excel Functions Explained

Section B: Functions All functions start with an equal sign, this informs excel that a function is being used. 1.1 SUM Function The Sum function calculates the sum total of values within a given range. Sum = Addition (+) only!

=SUM(range)

Illustration Function Result

=SUM (A1:A5) 25

=SUM (A1:D5) 75

=SUM (A3:D3) 15

=SUM (A1:A5) + SUM (C1:C5) =SUM(A1:A5,C1:C5)

44 Please note that column B and D is not included. Only the values of column A and C are added together.

Page 7: Assets Grade 12 Excel Functions Explained

1.2 IF Function The IF function checks to see if a certain condition is true or false and returns the relevant value. Remember that the TRUE or FALSE value may be of different data types, cell references or even functions.

=IF(Condition, Value_if_true, Value_if_false)

EXAMPLES OF THE IF FUNCTION Condition Value_if_true Value_if_false =IF(E19>90,100,20) E19>90 100 (number) 20 (number)

=IF(A10<50,B2,B6) A10<50 B2 (cell reference) B6 (cell reference)

=IF(A1 >= 50,”Passed”,”Fail”) A1>=40 “Passed” (text value) “Fail” (text value)

=IF(B1>SUM(A1:A10),B1*0.2,B1*0.1) B1>SUM(A1:A10) B1*0.2 (formula) B1*0.1 (formula)

=IF(SUM(B13:B29)>60,AVERAGE(B13:B29),0) SUM(B13:B29)>60 AVERAGE(B13:B29) 0

1.3 AVERAGE Function Returns that average of a given range by adding up all the values within that range that contains values and dividing it by the number of cells within that range that contains values.

=AVERAGE(Range)

Illustration Function Result

=AVERAGE(A1:A5) 4.8

=AVERAGE(A1:C5) 8.07

=AVERAGE(C1:C5) 16

Page 8: Assets Grade 12 Excel Functions Explained

=AVERAGE(A1:A5,C1:C5) =AVERAGE(A1:A5)+AVERAGE(C1:C5)

10.4 Returning the average of the cells selected within the ranges. 20.8 Adding the separate averages together.

1.4 MAX Function Returns the maximum value within a given range. =MAX(Range)

Illustration Function Result

=MAX(A1:A5) 7

1.5 MIN Function Returns the minimum value within a given range. =MIN(Range)

Illustration Function Result

=MIN(A1:A5) 3

Page 9: Assets Grade 12 Excel Functions Explained

1.6 COUNTIF Function The COUNTIF function counts the number of cells that complies with a criteria.

=COUNTIF(range, criteria)

EXAMPLES OF THE COUNTIF FUNCTION Range Criteria Explanation

=COUNTIF(A2:A10,35) A2:A10 Values equal to 35 Count the number of cells in the range A2:A10 which contains the value 35.

=COUNTIF(C3:C20,”B”) C3:C20 Text equal to B Count the number of cells in the range C3:C20 containing a letter B.

=COUNTIF(D1:D10,”>150”) D1:D10 Values larger than 150 Count the number of cells in the range D1:D10 containing a value more than 150.

=COUNTIF(B4:B20,B1) B4:B20 Values equal to the value in cell B1

Count the number of cells in the range B4:B20 containing a value equal to cell B1

1.7 AND Function This function will return TRUE if all conditions in the AND function are met, otherwise it will return FALSE.

=AND(condition, condition, condition, …)

EXAMPLE OF THE AND FUNCTION Number of Conditions TRUE FALSE

=AND(A1 > 20, SUM(A1:A4) < 200, B1 = A3, D4 * 4 = 30)

4

You may have as many conditions as necessary.

Only returns True if all 4 conditions are true.

Will return False if one or more conditions are false.

1.8 OR Function This function will return TRUE if all one or more conditions in the OR function is met, otherwise it will return FALSE.

=OR(condition, condition, condition, …)

EXAMPLE OF THE OR FUNCTION Number of Conditions TRUE FALSE

=OR(A1 > 20, SUM(A1:A4) < 200, B1 = A3)

3

You may have as many conditions as necessary.

Only returns True if one or more conditions are true.

Will return False if all conditions are false.

Page 10: Assets Grade 12 Excel Functions Explained

1.7 SUMIF Function The SUMIF function adds cells of the sum range where the corresponding range of cells complies with a certain criteria or condition.

=SUMIF (range, criteria, sum_range)

Illustration Function Result

=SUMIF(B2:B10,11,C2:C10) =SUMIF(B2:B10,”>10”,C2:C10) Adds up all total Book fees of Grade 11 learners purchased.

R 240.00 R 690.00

=SUMIF(B2:B10,"Milk",C2:C10) Adds the total quantity of Milk purchased during the first couple of days in January.

23

1.8 Nested IF Statements A nested if statement is the IF function which replaces either the True section or False section with another IF function continuously, until a condition is met.

In cell A1 a student must type in his percentage, in cell A2 you must type in a function which will provide him with the level he has obtained.

Information about the levels: 80 – 100 = 7 70 – 79 = 6 60 – 60 = 5 50 – 59 = 4 40 – 49 = 3 30 – 39 = 2 0 – 29 = 1 =IF(A1>=80,7,IF(A1>=70,6,IF(A1>=60,5, IF(A1>=50,4, IF(A1>=40,3, IF(A1>=30,2,1))))))

Page 11: Assets Grade 12 Excel Functions Explained

1.10 ROUND Function Rounds of a given value, or value of a function to the decimal specified. Examples: =ROUND(20.78, 1) = 20.8 =ROUND(20.783, 2) = 20.78 =ROUND(20.787, 2) = 20.79 =ROUND(20.78, 0) = 21 =ROUND(23.78, -1) = 20 =ROUND(20.78, -2) = 0 =ROUND(89.76, -2) = 100 =ROUND(200.78, -3) = 0 =ROUND(890.76, -3) = 1000 1.12 ABSOLUTE REFERENCE

The Dollar Sign ($) is used to indicate constant value, meaning that the row or column or both do not change. Example: $B1 = Column does not change B$1 = Row does not change &B&1 = Column and Row does not change

1.13 Spreadsheets

When opening a new spreadsheet, the document contains three sheets. Each being separate in its own right. You may rename the sheets at the bottom of the pain. You can create a copy of an existing sheet, add or delete sheets. The order of these sheets can be changed by dragging them in the order as you want them.

Page 12: Assets Grade 12 Excel Functions Explained

1.14 Conditional Formatting There are several ways in order to make a spreadsheet easier to read. This can be done via changing text, adding colour and bordering cells. If you would like certain data to stand out in a column which satisfies a certain criteria, you may use conditional formatting.

Let’s look at the example above. Here we have a list of people with the amount of debt they still owe. Let’s use conditional formatting to show the people who owes more than a R1000. We can format that numbers with Red and a Gray background.

Select the column which you are doing conditional formatting to.

Click on Home and then Conditional Formatting.

Select New Rule

Select “Format only cells that contain"

Select the greater than option, and enter “1000”. This completes the rule. We still need to assign colour to the conditional formatting.

Select Format and edit the text colour to “Red” and select the colour “Gray” for the Fill option.

Your end result should display the following.

Page 13: Assets Grade 12 Excel Functions Explained

There are many different conditional formatting one can do. One can add more than one rule to conditional formatting. Lets add another rule to the same column, in this scenario, lets fill the cells with values less than R500.

Select the column which you are doing conditional formatting to.

Click on Home and then Conditional Formatting.

Select Manage Rules

Select New Rule

Select “Format only cells that contain”

Select the less than option, and enter “500”. This completes the rule. We still need to assign colour to the conditional formatting.

Select the colour “Blue” for the Fill option. The result should look like the following below.

1.15 Functions that can count

Name of Function What the function does Example

COUNT Counts the number of cells that have values (number, dates, currency) Not text.

=COUNT(A1:D10)

COUNTA Counts the number of cells that have values and text.

=COUNTA(A1:D10)

COUNTBLANK Counts the number of empty cells in a range.

=COUNTBLANK(A1:D10)

Page 14: Assets Grade 12 Excel Functions Explained

1.16 Large and Small

Name of function What the function does Example

LARGE

Determines the Nth largest number, where N is a whole number value. In the example, the 2nd largest number is determined.

=LARGE(A2:A30,2)

SMALL

Determines the Nth smallest number, where N is a whole number value. In the example, the 3rd smallest number is determined.

=SMALL(B1:B100,3)

1.17 Dates and Times This is done by using the custom option via properties of cells.

d mmmm yyyy dd-mmm-yy dd-mm-yyyy mmmm d. yyyy

01-Jan-00 1 January 1900 01-Jan-00 01-01-1900 January 1, 1900

20-Jan-00 20 January 1900 20-Jan-00 20-01-1900 January 20,1900

31-Jul-08 31 July 2008 31-Jul-08 31-07-2008 July 31,2008

15-Jan-10 15 January 2010 15-Jan-10 15-01-2010 January 15, 2010

07-Feb-07 7 February 2007 07-Feb-07 07-02-2007 February 7,2007

Calculations with dates

It calculates the days between 2 dates given. Thus there are 12 days between 19 July and 7 July. The current date can easily be inserted into a spreadsheet by typing <Ctrl><;> If you want to enter the current date, but want it automatically update, use =Today(). Calculations with times

The time is displayed as a fraction of a day, in other words 24 hours. You must then multiply the result with 24 in order to get 6 hours difference.

Page 15: Assets Grade 12 Excel Functions Explained

1.18 Functions with text data

Page 16: Assets Grade 12 Excel Functions Explained

1.19 VLOOKUP

Let's take a look at the VLOOKUP function. In our example we have a company with a list of part numbers, along with information about them. Let's assume this list is very long, and they would like to enter a part# in a cell and have it return information about that part quickly. This picture shows our desired result. In the orange cell we enter a part number, the location and price will automatically display

Page 17: Assets Grade 12 Excel Functions Explained

So how do we accomplish this? Here is the VLOOKUP in layman's syntax =VLOOKUP(CellToLookup ,RangeToLookIn, WhichColumnToReturn, ExactMatch?) And now in practice: 1. We need a list of data sorted by the first column. 2. In a blank cell that we would like to return a result from the list, type =VLOOKUP( 3. Click on the cell where we will enter the value to lookup (this will enter the cell in your formula) 4. Hit , (comma) 4. Click and drag to select the entire list including headers 6. Hit, (comma) 7. Type the numerical value of the column you would like to return (A is column 1, B is column 2, C is column 3) 8. Hit ,(comma) 9. Type "False" and hit enter

Side note: Enter "TRUE" to find an approximate match, one reason you might use approximation is on data with Typos or poor standards, for example "MR Man" and it's actually "MR. Man". Side note: This works across multiple worksheets. If you would like to store your data in one sheet, and you’re VLOOKUP in another, it's the same process.

1.20 HLOOKUP

In this picture we have a list of People and their respective Sales and a Table showing the Bonus they get if they hit a certain target.

Page 18: Assets Grade 12 Excel Functions Explained

In Column C we want to show the bonus based on sales. We do this by grabbing the Sales, comparing it to the Bonus Target table, and returning the bonus amount using HLOOKUP. Here is the HLOOKUP in layman's syntax =HLOOKUP(CellToLookup ,RangeToLookIn, WhichRowToReturn, ExactMatch?) And now in practice: 1. In a blank cell that we would like to return a result from the list, type =HLOOKUP( 2. Click on the cell where there is a value to lookup (this will enter the cell in your formula) 3. Hit , (comma) 4. Click and drag to select the entire list to look in 5. Hit, (comma) 6. Type the numerical value of the row you would like to return (Don't type the actual row number, this refers to the row to return in the data. In this example we return row 2 from our Bonus Target table. 7. Hit ,(comma) 8. Type "True" and hit enter Side note: We type "True" to return an approximate answer. To return an exact match type "False"

1.21 MATHEMATICAL, STATISTICAL and DATE Functions.

RAND Returns a random number (fraction/real) between 0 and 1.

=RAND() Answer: 0.923743 (As one example)

RANDBETWEEN Returns a random whole number between two numbers you specify.

=RANDBETWEEN(1,5) Answer: 2 (As one example)

MODE Returns the value that occurs most frequently in a range of data.

=MODE(A1:C10)

MEDIAN Returns the number in the middle of a set of sorted numbers. If there is an even set of numbers, the average of the middle two numbers is determined.

=MEDIAN(A1:C10)

TODAY Returns the current date. =TODAY()

NOW Returns the current date and time. =NOW()

Page 19: Assets Grade 12 Excel Functions Explained