I.T in Engineering: Abdullahi - Sada@bazeuniversity - Edu.ng

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Faculty of Engineering Electrical Engineering Department Baze University Abuja

I.T in
engineering
EEE308

Abdullahi Yusuf Sada


Email: Abdullahi.sada@bazeuniversity.edu.ng
Office: D31

GEC214 - Lecture 2 1
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

Microsoft excel

GEC214 - Lecture 2 2
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

Basic math
• Microsoft excel uses BODMAS when solving an equation.
𝑏+ 𝑏 2 −4𝑎𝑐
• This equation can be represented on excel as
2𝑎

GEC214 - Lecture 2 3
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

Logical Functions
• Microsoft Excel provides 4 logical functions to work with the logical
values. The functions are IF, AND, OR and NOT.
• You use these functions when you want to carry out more than one
comparison in your formula or test multiple conditions instead of just
one.
• As well as logical operators, Excel logical functions return either TRUE
or FALSE when their arguments are evaluated.

GEC214 - Lecture 2 4
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

Excel logical functions - facts


and figures
• In arguments of the logical functions, you can use cell references, numeric
and text values, Boolean values, comparison operators, and other Excel
functions. However, all arguments must evaluate to the Boolean values of
TRUE or FALSE, or references or arrays containing logical values.
• If an argument of a logical function contains any empty cells, such values
are ignored. If all of the arguments are empty cells, the formula returns
#VALUE! error.
• If an argument of a logical function contains numbers, then zero evaluates
to FALSE, and all other numbers including negative numbers evaluate to
TRUE. For example, if cells A1:A5 contain numbers, the formula
=AND(A1:A5) will return TRUE if none of the cells contains 0, FALSE
otherwise.

GEC214 - Lecture 2 5
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

• A logical function returns the #VALUE! error if none of the arguments


evaluate to logical values.
• A logical function returns the #NAME? error if you've misspell the
function's name or attempted to use the function in an earlier Excel
version that does not support it. For example, the XOR function can
be used in Excel 2016 and 2013 only.
• In Excel 2016, 2013, 2010 and 2007, you can include up to 255
arguments in a logical function, provided that the total length of the
formula does not exceed 8,192 characters. In Excel 2003 and lower,
you can supply up to 30 arguments and the total length of your
formula shall not exceed 1,024 characters.

GEC214 - Lecture 2 6
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

IF
• The IF function checks whether a condition is met, and returns one
value if true and another value if false.
• Example:

• Explanation: if the score is greater than or equal to 60, the IF function


returns Pass, else it returns Fail.
GEC214 - Lecture 2 7
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

AND
• The AND Function returns TRUE if all conditions are true and returns
FALSE if any of the conditions are false.
• Example:

• Explanation: the AND function returns TRUE if the first score is greater
than or equal to 60 and the second score is greater than or equal to 90,
else it returns FALSE.
GEC214 - Lecture 2 8
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

OR
• The OR function returns TRUE if any of the conditions are TRUE and
returns FALSE if all conditions are false.
• Example:

• Explanation: the OR function returns TRUE if at least one score is


greater than or equal to 60, else it returns FALSE.
GEC214 - Lecture 2 9
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

Not
• The NOT function changes TRUE to FALSE, and FALSE to TRUE.
• Example:

• Explanation: in this example, the NOT function reverses the result of


the OR function (see OR example).

GEC214 - Lecture 2 10
By Abdullahi Yusuf Sada
Faculty of Engineering Electrical Engineering Department Baze University Abuja

Nested if
• The IF function in Excel can be nested, when you have multiple conditions to
meet. The FALSE value is being replaced by another IF function to make a
further test.
• Example:

• Explanation: if the score equals 1, the nested IF formula returns V.Bad, if the
score equals 2, the nested IF formula returns Bad, if the score equals 3, the
nested IF formula returns Good, if the score equals 4, the nested IF formula
returns V.Good, if the score equals 5, the nested IF formula returns Excellent,
else it returns Not Valid.
GEC214 - Lecture 2 11
By Abdullahi Yusuf Sada

You might also like