Microsoft
excel is a spread sheet application package designed mainly for statistical and
mathematical computation. The built in function in Microsoft (MS) excel makes
if uses simple and logical, hence relieving it user(s) of most common computational
task like computation of student results, Salary payment sheet, pension sheet
and more. This is only achievable by inputting logical formula into cell(s)
The logical If Function.
IF(logical_test, value_if_true,
value_if_false,)
The
major thing to note here is these three items between the round brackets of the
word IF above. These are the arguments that the IF function needs. Here's what
they mean respectively;
logical_test
The first argument is what you want to test for. Is the
number in the cell equal to or greater than 80?
value_if_true
This is what you wish to see when the logical IF is
true/yes. That is, if the answer to the first argument is YES. (Award an “A” grade
if the referred cell value is >=70 for instance)
value_if_false
This is what you want to do if the answer to the first
argument is false/NO.
Should
the above explanation made no sense to you, open spreadsheet on your system by
following this direction “Start>All programs>Microsoft
office>Microsoft excel” for practical illustration and do the following:
Fig 1.0
I.
Enter Fig. 1.0 data into the
spreadsheet (MS Excel) you just opened.
II. Place your cursor on cell D4, in the
“Grade” column and input/type =IF(C4>=70,"A",IF(C4>=60,"B",IF(C4>=50,"C",IF(C4>=45,"D",IF(C4>=40,"E",IF(C4<=39,"F"))))))onlythe logical formula in red should be typed into cell D4.
III.
Hit the enter key on your keyboard
to activate the command. If you have done it according, “B” will appear in that
cell (D4). To have grade displayed in the rest of the cells in grade column,
place your cursor on cell D4 where grade “B” is and copy the content of that
cell painstakingly. Now, select the rest cells in the grade column which has no
grade for scores and paste the content of D4 that you have just copied. If you
have done it correctly, all the scores should have grades now accordingly.
Note; what you copied from cell D4 is
not the displayed “B” but the formula that produced “B”
Fig 2.0
IV.
The next task is to format the
remark column so that each cell in that column can have either “pass” or “Fail”
remark according to student score. In same manner, place your cursor on cell E4
and input/type =IF(C4<40,"Fail","Pass")
then hit the enter key to activate the command. If you have typed it
correctly, “pass” will be seen in that cell. Now, place your cursor on cell E4
with the remark “pass” and copy it content carefully. Select the rest cells in
the remark column where there is no remark and past the copied information to
have remark display against every score in the spreadsheet.
Note;Ensure
you have all the commas, double quotes and bracket in the correct places,
otherwise Excel will give you an error message. The right angle bracket “( >)”
is known as Conditional Operator.
Summary
The
whole grammar above means just three (3) things:-
I.
logical_test: Is the value in cell C4 greater than or equal 70?
II.
value_if_true: If the answer is Yes, display the grade
"A” or if it is >=60, display grade “B” or if it is >=50, display
grade “C” or if it is >=45, display grade “D” or if it is >=40, display
grade “E” or if it is <=39, display grade “F”
III.
value_if_false: This
also draw response from II above.
All
of the three (3) put together give IF(logical_test,
value_if_true, value_if_false,)
You
tell Excel what you want to check for in the cell, then what you want to do if
the answer is YES, and finally what you want to do if the answer is NO. You separate
each part with a comma, Proper double quote and close every opened bracket.
Keep
in touch for update in the future.