Top Banner
Computer II Revision Formatting of cell: o Format>>cells Number: the format that will be entered into the cell For example: if we want to enter $1,000 Format>>cells>>currency Alignment: the position of the text Text alignment: how the text is aligned. Orientation: how the cell will be oriented in the cell If we want to change the orientation we will drag the text arrow Exampl Result
25

MIU Excel Revision

Mar 30, 2015

Download

Documents

Xanozikan

Microsoft Excel Revision for Misr International University
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MIU Excel Revision

Computer II

Revision

Formatting of cell: o Format>>cells

Number: the format that will be entered into the cell For example: if we want to enter $1,000Format>>cells>>currency

Alignment: the position of the text Text alignment: how the text is aligned. Orientation: how the cell will be oriented in the cell

Text Control:o Wrap text: if we have two words in the same cell

beside each other and we want to put each word on a separate line.

If we want to change the orientation we will drag the text arrow according to the orientation we want

Example:

Result:

Example:

Page 2: MIU Excel Revision

o Shrink to fit: shrinks the text inside the cell in order to be able to fit into the cell

o Merge cells: opens the cells to be one cell.

Font: this tab is responsible to change the font style, color, etc.

Border: this tab is responsible to insert borders on cells. Patterns: this tab is responsible for shading of cells. (fill color

of cells)o Format>>Rows

Height: to adjust the height (in points) of a certain row Autofit: allows the text to fit in one row.

For example: if we have a sentence that doesn’t fit in one cell by applying autofit, it will fit into this cell.

o Format>>Column Width: to adjust the width (in points) of a certain column Autofit: allows the text to fit in one column

Result:

Page 3: MIU Excel Revision

Sorting: o Data>>Sort

Before you select sort, you have to first select you range that you want to sort

Then you will select Data>>sort, this box will appear:

You will select in the sort by part how do you want to sort, by number, or by text, or whatever the data that is present in you range. Then you will specify how do you want to sort it, either in ascending order (from small to big), or in descending order (from big to small). Then press OK, your data will then be sorted.

Example:

Page 4: MIU Excel Revision

Simple Formulas: o Add, subtract, multiply, divide

In order to perform any of the above operations using excel you will have to put their signs as follows: +, -, *, /

o N.B. Priorities goes to brackets, then to division, multiplication, addition, subtraction.Ex: 2+3*8=26; here 3*8 was performed first then 2+3 because multiplication has a higher priority then addition.(2+3)*8=40; brackets were done first because brackets has a higher priority then multiplication.

Example:If we want to add (or perform any of the above operations) the following using excel:(1) 2+3(2) A1+B2+C3

Answer (2+3): first of all we have to put the equal sign before we write anything, then we will write the numbers we want to calculate, and then we press enter.

Result:

After we press enter:

Page 5: MIU Excel Revision

Answer (A1+B2+C3): if we have the following excel sheet and we want to add the content that is in cells A1, B2, and B3, all we have to do is select the cell that we will write the formula in, we will add these three numbers by clicking on each cell, we will click on A1, then type +, then click on B2, then type +, then click on C3, and then enter.

Relative Reference: o When you copy a formula from one cell to another Excel will

automatically paste adjusted references in the destination cells relative to the position of the formula.

o If you drag the Autofill Handle down or copy the formula down, the range reference B2:B4 for example is changed to B3:B5, where the row numbers are changed but column letter remain.

o Example: if we have the following data, we have the salary and the bonus and we want to calculate the total salary which is the salary + bonus. We will write the addition equation in the first cell of total salary column which is C2, as shown:

Example: How to do it:

Result:

Page 6: MIU Excel Revision

After we press enter and we get the result for the first set of numbers (A2+B2), we will stop with the cursor of the mouse at the corner of the cell until a small black cross appears, we will then drag until we reach the last set of number, and at the end we will find that the total salary has been automatically calculated without writing the equation all over again.

And that is how excel has adjusted the references according to the destination.

Absolute Reference: o We use absolute reference if we don’t want excel to adjust

references when we copy a formula to a different cell.o Example: if we have a formula, =B2*B7, and we copy the formula to

another cell, Excel will adjust both references. If we copy down one cell, =B2*B7, is changed to =B3*B8. If we don’t want B7 to change to B8 we must make B7 absolute reference by placing a dollar sign ($) before the parts of the reference to be $B$7.

Page 7: MIU Excel Revision

This can be done by putting the cursor in the formula bar before B7 for example and press the button F4.

Simple Formula: o In order to write any formula we have to write the “=” sign before

we write anything.o The following table illustrates our functions:

Function Name Description ResultSum() adds values or ranges of cells

within the parenthesis =SUM(1,4,7)Result: 12

Count() Counts the number of cells that contains number from the arguments

=COUNT(1,4,B3,20)Result: 4

CountA() Counts the number of cells that are not empty from the arguments. Also counts the cells that have text in them.

=COUNTA(1,4,B3,20)Result: 4

CountBlank() Counts empty cells in a specified range of cells

=COUNTBLANK(A3:A5)Result: 1

Countif() Counts the number of cells within a range that meet a single criterion that specify.

Max() find the largest number from the arguments

=MAX(20,25,15)Result: 25

Min() Find the smallest number from the arguments

=MAX(20,25,15)Result: 15

Average() Find the average for the arguments

=AVERAGE(20,25,15)Result: 20

Mode() Returns the most frequent numbers in an array or a range of data.

=MODE(1,4,4,4,5)Result: 4

Page 8: MIU Excel Revision

Median() Returns the median of the given numbers. The median is the number in the middle of a set of numbers

=MEDIAN(1,2,3,4,5,6)Result: 3

Stdev() Returns the standard deviation of a set of numbers

=stdev(20,30,40,50)Result: 12.90994449

Example: Solve the following questions:

(1) Calculate the total for Salary column(2) How many employees are there(3) How many employees do not have an ID(4) How many employees live in Alex, and how many in cairo(5) How many students take a salary 1,000, and how many takes 2,000(6) Find the maximum salary(7) Find the minimum salary(8) Find the average of the salary column(9) Find the mode and median of salary column(10) Find the standard deviation of the salary column.

Page 9: MIU Excel Revision

Solution: Answers to the previous questions:

(1) =SUM(D2:D6); 7000

(2) =CountA(A2:A6); 5

(3) =Countblank(B2:B6); 2

Page 10: MIU Excel Revision

(4) =countif(C2:C6,”Alex”); 3. (same thing to be done with cairo)

(5) =countif(D2:D6,”1000”); 3 (same thing to be done with 2,000)

Page 11: MIU Excel Revision

(6) =max(D2:D6); 2,000

(7) =min(D2:D6); 1,000

Page 12: MIU Excel Revision

(8) =average(D2:D6); 1,400

(9) =mode(D2;D6); 1000 =median(D2:D6); 1000

Page 13: MIU Excel Revision

(10) =stdev(D2:D6); 547.7225575

Page 14: MIU Excel Revision

Functions:

Function name Equivalent in ExcelLn Ln

Log LogFactorial or ! fact

Square root or sqrt

Exponential or e(x) Exp(x)Power

Example: (x)2 (x)^2

“^” is written by pressing shift+6

Examples: given then value of x calculate the following functions:

(1) f(x)1 = log(x) + ln(x) +

(2) f(x)2 = (x)2 + e(x) + (x-1)!

(3) F(x)3 =

Solutions: (how to write them using excel)N.B. you don’t have to write each function for each number every time, you will only write it in the first cell, and then drag it to the rest of the cells using fill handle.

Page 15: MIU Excel Revision

(1) f(x)1: =log(A23) + ln(A23) + sqrt(A23^2 + fact(A23+1) + exp(A23))answer: 33526120087

(2) f(x)2: =A23^2 + exp(A23) + fact(A23-1)

(3) f(x)3: =sqrt(fact(A23+1) + log(A23))

Page 16: MIU Excel Revision

if statements: o The if statement returns a value if a certain condition is TRUE, and

another value if the same condition is FALSE.For example, if we have a condition that states if a number is more than 10, then we write over 10, and if it is not, then we write less than 10.

o The syntax of the if statement is as follows:=if(logical_test, value if true, value if false)So if we want to write the above example in the if statement, first we have to check which is our logical test, which is our value if it is true, and which is our value if it is false. When we write our if statement, we will write our logical test, then a , (comma), after the first comma excel will understand that we are writing our value if true, then we write the second ,(comma), excel will also understand that after the second comma we are writing our value if false. In the above example our logical test is if a number is more than 10, our value if true is that we will write more than 10, and if it is false we will write less than 10.Answer: =if(I2>10,”more than 10”,”less than 10”)

Logical test Value if true Value if false

Page 17: MIU Excel Revision

o Solve the following using if statements:(1) X=50

If X<=100, return within budget, otherwise return over budget.(2) X=50

If X = 100, return X*50, otherwise return X + 50

Solutions:(1) =if(I4<=100,”within budget”, ”over budget”)

Answer: within budget

(2) =if(I4=100,I4*50,I4+50 Answer: 100

Page 18: MIU Excel Revision

o Nested If: nested if means more than one statement in one if statement.

o Example: in a university we want to find the grade from the total of the student, we have a range of totals each with a different grade. The university system states that:<=90 then you have a grade A<=80 then you have a grade B<=70 then you have a grade C<=60 then you have a grade D>60 then you have a grade FIn order to solve this problem using if statements we will need more than one if statement, and we will write them all in one if statement.So this is how the if statement will look like: (each if statement will be highlighted in red)

=if (cell number>=90, “A”, if ( cell number>=80, “B”, if ( cell number>=70, “C”, if ( cell number>=60, “D”, if ( cell number<60, “F”)))))

Matrices:

We have three functions needed to work with matrices, multiplication of 2 matrices, the inverse if a matrix, and the determinant of a matrix.Functions: (1) Multiplication: =mmult(2) Inverse: =minverse(3) Determinant: =mdeterm

Example:

Matrix X

1st if

Logical_testValue if true Value if false will contain the next if

Matrix Y

Page 19: MIU Excel Revision

1 2 34 5 67 8 9

To multiply these 2 matrices:X*Y=First you will have to highlight the range that you will put your answer in

Then you will write =mmult(highlight matrix X, highlight matrix Y), then press Ctrl+Shift+Enter.

To find the inverse of a matrix:X-1=First you will highlight the range you will put the answer in as shown above, then you will write =minverse(highlight matrix X), then press Ctrl+Shift+Enter

To find the determinant of a matrixSelect one cell only, then write =mdeterm(highlight matrix X), then press enter.

Charts: To insert a chart, you will select the columns needed, then you will press insert>>chart, and then select the shape of the chart given.

10 11 1213 14 1516 17 18