Office 2007 - Excel

Lesson 35: Functions in Detail (cont…)

35/83 Lessons 

“LEFT/RIGHT”

The “LEFT” function returns the first character (s) in a string as result.
For example:
We typed Piet De Greyt in cell A1.
If we want to separate first name into cell A2, we type = LEFT (A1, 4)
The first argument for the function in our cell is A1.
The second argument for our function is the number of characters, 4.
This results Piet.

The RIGHT function does the same, only we start counting from the right.
For example:
We still have Piet De Greyt in cell A1.
We type = RIGHT (A1, 5)
The result is: Greyt

Note 1: a space is considered as a character.
Note 2: when you change the data in cell A1, the cell contents will automatically be adjusted in cell A2. If you want to retain the contents of cell A2, copy and paste it using paste special and choose “Values”.
Thus, only the value of the cell is preserved, and not the formula.

“TRIM”

The “TRIM” function, deletes the spaces before and after the text in our cell. NOT in the text (we use this function to align the text with irregular spacing).
For example, to remove the spaces in the cells A2 and A5 for the customer name, and not in the customer’s name (see cell A3).

Note1: Please note, if you knew the data from column A, the formulas in column B can be adjusted. First copy and paste values from column B, as you’ve done in the previous function.

“IF”

The IF function returns a value if a condition is met, and another value when this condition is not met.
For example in the below image whether a student has passed or failed.

I’ll try to explain the formula:

We always begin our formula with an equals sign, followed by the IF function, and the opening parenthesis.
We need to know whether the total marks obtained, is greater than the half of total marks.
So cell E3 (total) > 15, because this is the half of the total marks that can be obtained (30)
If this is true, Excel displays the value “successful”, this is not true, Excel displays the value “failed”.
We finish the formula by the closing parenthesis, and click Enter.
We keep a coma (,) between two arguments
Text in a formula should always be in quotation marks (“”)

Awesome!
You've completed Lesson 35
START NEXT LESSON