Excel IF Function.

Slides:



Advertisements
Similar presentations
Pre-defined System Functions Simple IF & VLOOKUP.
Advertisements

Tutorial 3 Calculating Data with Formulas and Functions
Calling all Data Geeks! Corey McAfee October 24, 2014 Corey McAfee October 24, 2014.
Tutorial 7: Using Advanced Functions and Conditional Formatting
259 Lecture 4 Spring 2010 Logical Functions and Conditional Formatting in Excel.
Tutorial 8: Working with Advanced Functions
Excel 2007 Part (2) Dr. Susan Al Naqshbandi
Spreadsheets Objective 6.02
1CP102_module 3: spreadsheet2 More features in Excel Selection: a cell, a range, multiple ranges Name a range: to give name to a selected range or multiple.
2 Explain advanced spreadsheet concepts and functions Advanced Calculations 1 Sabbir Saleh_Lecture_17_Computer Application_BBA.
Copyright 2007, Paradigm Publishing Inc. EXCEL 2007 Chapter 2 BACKNEXTEND 2-1 LINKS TO OBJECTIVES Naming Ranges Functions COUNT, COUNTA, COUNTIF, COUNTIFS.
Chapter 6 Advanced Functions Copyright 2005 Radian Publishing Co.
Excel 2010 Formulas and Functions One of Excel's most useful features is that it allows users to create custom formulas to perform calculations on their.
Lesson 4 Cell Reference Formulas. Working with Cell References continued… Relative Cell Reference A relative cell reference means that the cell value.
Computer Science 1000 Spreadsheets II Permission to redistribute these slides is strictly prohibited without permission.
CIS300 TEST REVIEW EXAM 1- PROF. ZURADA & PROF. GUAN REACH - CRC © 2010 REACH All Rights Reserved.Fall 2010.
REACH-CRC © 2013 REACH-CRC. All Rights Reserved.Spring 2013.
LOGO Chapter VI Advanced Functions 1. LOGO Overview  INTRODUCTION  NESTED FUNCTIONS  LOOKUP  VLOOKUP  COUNTIF  SUMIF  IF  ROUND  THE PMT, IPMT.
COMPREHENSIVE Excel Tutorial 7 Using Advanced Functions, Conditional Formatting, and Filtering.
Microsoft Office Excel 2013 ® ® Abdul Hameed Using Advanced Functions and Conditional Formatting.
CIS300 TEST REVIEW EXAM 2- PROFS. KENDRA, GOYAL & MCINTOSH REACH - CRC © 2014 REACH All Rights Reserved.
Lesson 5: Working with Formulas and Functions Logical and 3D Formulas.
Excel Web App By: Ms. Fatima Shannag.
REACH-CRC © 2012 REACH-CRC. All Rights Reserved.FALL 2012.
Excel 2007 Part (3) Dr. Susan Al Naqshbandi
More Spreadsheets Range Formulas & Empty Cells Logical Functions Lookup Functions.
CIS300 Test Review REACH - CRC © 2010 REACH All Rights Reserved.Fall 2010.
Microsoft Office 2013 ®® Calculating Data with Formulas and Functions.
Intermediate Excel 2013 Gareth Johns IT Skills Development Advisor.
RevisionRevision Function in Spreadsheet DATE Returns the serial number of a particular date. Syntax –DATE(year,month,day) year is a number from 1900.
Microsoft ® Excel ® 2013 Enhanced Excel Tutorial 3 Calculating Data with Formulas and Functions.
Microsoft Excel Prepared by the Academic Faculty Members of IT.
CIS 300- Professor Im Test #2. MICROSOFT ® EXCEL ® LOOKUP FUNCTIONS Syntax: =VLOOKUP(lookup_value,table_array,col_index_num,[range_lookup]) Arguments:
CIS 100 Test #2 Review 1. EXCEL Functions on Test  SUM, COUNT, COUNTA, MAX, MIN, MEDIAN, MODE, AVERAGE, ROUND, and IF  Possibly Others 
Hoi Le. COUNTIF Countif(, ) Return number of elements that meet the criteria Always put criteria in quotation marks Example 1: count number of employees.
Resource Review Excel formula basics Demonstrate how to enter manual formulas Examine some of the available functions and their usage Discuss the.
CIS 100 Test #3 Review REACH Computer Resource Center.
MS-EXCEL PART 3. Use data validation in Excel to make sure that users enter certain values into a cell. Data Validation Example In this example, we restrict.
CIS300 Test Review REACH-CRC © 2012 REACH-CRC. All Rights Reserved.FALL 2012.
AGB 260: Agribusiness Data Literacy
Logical Functions and Conditional Formatting in Excel
Using Advanced Formulas
MSAA PRESENTS: AN EXCEL TUTORIAL
Excel AVERAGEIF Function
Contents Introduction Text functions Logical functions
Excel ISERROR Function
REACH Computer Resource Center
TRACKER Contents Intro Excel 101 Math Operations Formulas 101.
2007 MICROSOFT EXCEL INTERMEDIATE
Analyzing Table Data.
REACH CRC Professor Reinhardt
CIS300 Test Review REACH - CRC Fall 2010
CS1100: Computer Science and Its Applications
Analyzing Data Using Formulas
How To Use VLOOKUP In Microsoft Excel
Managing Multiple Worksheets and Workbooks
Unit 42 : Spreadsheet Modelling
Advanced Microsoft Excel
Working with Formulas and Functions
MS Excel Scaffolding START.
Microsoft Excel – Part I
Spreadsheets 2 Explain advanced spreadsheet concepts and functions
VLookup and HLookup in Microsoft Excel
Excel Tips and Tricks Presented by: Tracee Baker, Business Analyst, TD Ameritrade July 21, /3/2019.
REACH CRC Professor Manni
Spreadsheets Objective 6.02
REACH Computer Resource Center
Spreadsheets Objective 6.02
Working with Formulas and Functions
REACH Computer Resource Center
Presentation transcript:

Excel IF Function

Excel IF Function Purpose Test for a specific condition Return value The values you supply for TRUE or FALSE Syntax  =IF (logical_test, [value_if_true], [value_if_false]) Arguments  logical_test - A value or logical expression that can be evaluated as TRUE or FALSE. value_if_true - [optional] The value to return when logical_test evaluates to TRUE. value_if_false - [optional] The value to return when logical_test evaluates to FALSE. www.prolearninghub.com

Excel IF Function Usage notes Use the IF function to test for or evaluate certain conditions, and then react differently depending on whether the test was TRUE or FALSE. For example, let's say you want to assign either "Pass" or "Fail" to students based on a test score. In that case, you need to test the sore itself (for each student) and then return either "Pass" or "Fail". If you had a score in cell C6, and you wanted to test this score to see if is at least 70, you would use this: C6>=70 www.prolearninghub.com

Excel IF Function This translates as "C6 contains a value greater than or equal to 70". It will either be TRUE or FALSE, depending on the value in C6. You then supply a value that the IF function should return if the test is TRUE, and a value to use if the test is FALSE. Putting it all together, you would use this formula: =IF(C6>=70, "Pass", "Fail") This is the formula that appears D6 in the example shown. When it is copied down the column, it will test every score and return the correct result. www.prolearninghub.com

Excel IF Function Nested IF statements You may here the term "Nested IF" or "Nested IF statement". This refers to using more than one IF function so that you can test for more conditions and return more possible results. Each IF statement needs to be carefully "nested" inside another so that the logic is correct. For example, the following formula can be used to assign an grade rather than a pass / fail result: =IF(C6<70,"F",IF(C6<75,"D",IF(C6<85,"C",IF(C6<95,"B","A")))) www.prolearninghub.com

Excel IF Function Up to 64 IF functions can be nested. However, in general, you should consider other functions, like VLOOKUP or HLOOKUP for more complex scenarios, because they can handle more conditions in much more streamlined fashion. Logical operators When you are constructing a test with IF, you can use any of the following logical operators: Comparison operator Meaning Example = equal to A1=D1 > greater than A1>D1 >= greater than or equal to A1>=D1 < less than A1<d1< td=""></d1<> <= less than or equal to A1<=D1 <> not equal to A1<>D1 www.prolearninghub.com

Excel IF Function Notes: If any of the arguments to IF are supplied as arrays, the IF function will evaluate every element of the array. To count things conditionally, use the COUNTIF or the COUNTIFSfunctions. To sum things conditionally, use the SUMIF or the SUMIFS functions. www.prolearninghub.com

Excel IF Function www.prolearninghub.com

Excel IFERROR Function

Excel IFERROR Function Purpose  Trap and handle errors Return value  The value you specify for error conditions. Syntax  =IFERROR (value, value_if_error) Arguments  value - The value, reference, or formula to check for an error. value_if_error - The value to return if an error is found. www.prolearninghub.com

Excel IFERROR Function Usage notes  Use the IFERROR function to trap and handle errors produced by other formulas or functions. IFERROR checks for the following errors: #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!. For example, if A1 contains 10, B1 is blank, and C1 contains the formula =A1/B1, the following formula will trap the #DIV/0! error that results from dividing A1 by B1: =IFERROR (A1/B1. "Please enter a value in B1") In this case, C1 will display the message "Please enter a value in B1" if B1 is blank or zero. www.prolearninghub.com

Excel IFERROR Function Notes: If value is empty, it is evaluated as an empty string ("") and not an error. If value_if_error is supplied as an empty string (""), no message is displayed when an error is detected. If IFERROR is entered as an array formula, it returns an array of results with one item for each cell in value. www.prolearninghub.com

Excel IFERROR Function www.prolearninghub.com

Excel IFS Function

Excel IFS Function Purpose Test multiple conditions, return first true Return value  Value corresponding with first TRUE result Syntax  =IFS (test1, value1, [test2, value2], ...) Arguments  test1 - First logical test. value1 - Result when test1 is TRUE. test2, value2 - [optional] Second test/value pair. www.prolearninghub.com

Excel IFS Function Usage notes Use the IFS function to test multiple conditions and return a value corresponding to the first TRUE result. Unlike the IF function, IFS allows you to test more than one condition without nesting. This makes formulas with many conditions easier to read. Arguments are entered in test/value pairs. Each test (condition) represents a logical test that returns TRUE or FALSE, and each value is associated with the previous test. A value is returned by IFS only when its test returns TRUE, and the first test with a TRUE result "wins". The IFS function supports up to 127 conditions. www.prolearninghub.com

Excel IFS Function In the example shown the formula in E5 is: =IFS(D5<60,"F",D5<70,"D",D5<80,"C",D5<90,"B",D5>=90,"A") Note: the IFS function is new in Excel 2016 on Windows, and won't work in other versions of Excel. Notes: There is no way to set a default if all tests return FALSE (i.e. a value if false). Instead, enter TRUE for the last test, and then a value to return as a default value if FALSE. All logical tests must return TRUE or FALSE. Other results will case IFS to return a #VALUE! error. If no logical tests return TRUE, IFS returns the #N/A error. www.prolearninghub.com

Excel IFS Function www.prolearninghub.com

Excel NOT Function

Excel NOT Function Purpose Reverse arguments or results Return value A reversed logical value Syntax  =NOT (logical) Arguments  logical - A value or logical expression that can be evaluated as TRUE or FALSE. Usage notes  Use the NOT function to reverse a value or logical argument, that is, if logical is FALSE, NOT returns TRUE. If logical is TRUE, NOT returns FALSE. www.prolearninghub.com

Excel NOT Function Why would you want to do this? A common example is to reverse the behavior of another function. For example, If the cell A1 is blank, then the formula =ISBLANK(A1) will return TRUE. NOT can be used to reverse this result to FALSE like this: =NOT(ISBLANK(A1)) In essence, by adding NOT, you are able to create a formula that behaves like ISNOTBLANK, which doesn't exist in Excel. www.prolearninghub.com

Excel Or Function

Excel OR Function Purpose Test multiple conditions with OR Return value  TRUE if any arguments evaluate TRUE; FALSE if not. Syntax  =OR (logical1, [logical2], ...) Arguments  logical1 - The first condition or logical value to evaluate. logical2 - [optional] The second condition or logical value to evaluate. www.prolearninghub.com

Excel OR Function Usage notes Use the OR function to test multiple conditions at the same time, up to 255 conditions total. For example, to test if the value in A1 OR the value in B1 is greater than 75, use the following formula: =OR(A1>75,B1<75) OR can be used to extend the functionality of functions like IF. Using the above example, you can supply OR as the logical_test for an IF function like so: =IF(OR(A1>75,B1<75), "Pass", "Fail") www.prolearninghub.com

Excel OR Function This formula will return "Pass" if the value in A1 is greater than 75 OR the value in B1 is greater than 75. If you enter OR as an array formula, you can test all values in a range against a condition. For example, this array formula will return TRUE if any cell in A1:A100 is greater than 15: ={OR(A1:A100>15} Notes: Each logical condition must evaluate to TRUE or FALSE, or be arrays or references that contain logical values. Text values or empty cells supplied as arguments are ignored. The OR function will return #VALUE if no logical values are found www.prolearninghub.com

Excel OR Function www.prolearninghub.com

Excel TRUE Function

Excel TRUE Function Purpose Generate the logical value TRUE Return value  The logical value TRUE Syntax  =TRUE () Usage notes  The TRUE function is provided for compatibility with other spreadsheet applications and there is no need to use it in almost all cases. www.prolearninghub.com

Excel TRUE Function If you want to enter TRUE, or provide TRUE as a result in a formula, you can just use enter the word TRUE directly into a cell or formula and Excel will interpret this as the logical value TRUE. For example, these formulas are functionally identical: =IF(A1<0, TRUE()) =IF(A1<0, TRUE) Also note that logical expressions themselves will automatically generate TRUE and FALSE results. For example, the formula in cell C7 is: =B7>90 This expression evaluates to TRUE, which is the result that appears in the spreadsheet. If you want to test a condition and return different results based on whether the results are TRUE or FALSE, see the examples on this page. www.prolearninghub.com

Excel TRUE Function www.prolearninghub.com

Excel ADDRESS Function

Excel ADDRESS Function Purpose  Create a cell address from a given row and column Return value  A cell address in the current or given worksheet. Syntax  =ADDRESS (row_num, col_num, [abs_num], [a1], [sheet]) Arguments  row_num - The row number to use in the cell address. col_num - The column number to use in the cell address. abs_num - [optional] The address type (i.e. absolute, relative). Defaults to absolute. a1 - [optional] The reference style, A1 vs R1C1. Defaults to A1 style. sheet - [optional] The name of the worksheet to use. Defaults to current sheet. www.prolearninghub.com

Excel ADDRESS Function Usage notes  Use ADDRESS to create an address from a given row and column number. For example, ADDRESS(1,1,) will return $A$1. Abs_num key: 1 or omitted  Absolute 2  Absolute row; relative column 3  Relative row; absolute column 4  Relative www.prolearninghub.com

Excel AREAS Function

Excel AREAS Function Purpose Get the number of areas in a reference. Return value  A number representing number of areas. Syntax  =AREAS (reference) Arguments  reference - A reference to a cell or range of cells. Usage notes  Reference can include more than one reference. you must separate multiple references with a comma and wrap then in an extra set of parentheses. Otherwise, Excel will think the commas indicate multiple parameters and generate an error. As an example, the formula =AREAS((F17:F19,J16:J18,I8)) will return 3. www.prolearninghub.com

Excel CHOOSE Function

Excel CHOOSE Function Return value The value at the given position. Syntax  =CHOOSE (index_num, value1, [value2], ...) Arguments  index_num - The value to choose. A number between 1 and 254. value1 - The first value from which to choose. value2 - [optional] The second value from which to choose. Usage notes  Choose can handle up to 254 values. Index_num returns a value based on it's position in the list. For example, if index_num is 2, value2 is returned. Values can also be references. For example, the address A1, or the ranges A1:10 or B2:B15 can be supplied as values. www.prolearninghub.com

Excel CHOOSE Function www.prolearninghub.com

Excel COLUMN Function

Excel COLUMN Function Purpose Return value Syntax Arguments Get the column number of a reference. Return value  A number representing the column. Syntax  =COLUMN ([reference]) Arguments  reference - [optional] A reference to a cell or range of cells. Usage notes  Use reference to get column number of a reference. Reference can be a single cell address or a range of cells. Reference is optional and will default to the cell in which the COLUMN function exists. Reference cannot include multiple references or addresses. www.prolearninghub.com

Excel COLUMNs Function

Excel COLUMNS Function Purpose  Get the number of columns in an array or reference. Return value  A number representing column count. Syntax  =COLUMNS (array) Arguments  array - A reference to a range of cells. Usage notes  Use the COLUMNS function to get the number of columns in a reference. For example, the formula =COLUMNS(A1:F1) returns the number 6. Array can be an array, an array formula, or a reference to a single contiguous group of cells. www.prolearninghub.com

Excel FORMULATEXT Function

Excel FORMULATEXT Function Purpose  Get the formula in a cell Return value  The formula as text Syntax  =FORMULATEXT (reference) Arguments  reference - Reference to cell or cell range. Usage notes  You can use the FORMULATEXT function to extract a formula as text from a cell. Once extracted, you can work with the formula like any other text. www.prolearninghub.com

Excel FORMULATEXT Function Remember that you can temporarily display all formula in a worksheet with a keyboard shortcut. If you just want to test to see if a cell contains a formula or not, use the ISFORMULA function. Notes: If you use FORMULATEXT on a cell that doesn't contain a formula, you'll get an #N/A error. You can reference another workbook, but if the workbook is not open, you'll get an #N/A error. FORMULATEXT was introduced in Excel 2013. www.prolearninghub.com

Excel FORMULATEXT Function www.prolearninghub.com

Excel HLOOKUP Function

Excel HLOOKUP Function Purpose  Look up a value in a table by matching on the first row Return value  The matched value from a table. Syntax  =HLOOKUP (value, table, row_index, [range_lookup]) Arguments  value - The value to look up. table - The table from which to retrieve data. row_index - The row number from which to retrieve data. range_lookup - [optional] A boolean to indicate exact match or approximate match. Default = TRUE = approximate match. www.prolearninghub.com

Excel HLOOKUP Function Usage notes  HLOOKUP searches for a value in the first row of a table. At the match column, it retrieves a value from the specified row. Use HLOOKUP when lookup values are located in the first row of a table. Use VLOOKUP when lookup values are located in the first column of a table. Range_lookup controls whether value needs to match exactly or not. The default is TRUE = allow non-exact match. Set range_lookup to FALSE to require an exact match. www.prolearninghub.com

Excel HLOOKUP Function If range_lookup is TRUE (the default setting), a non-exact match will cause the HLOOKUP function to match the nearest value in the table that is still less than value. When range_lookup is omitted, the HLOOKUP function will allow a non-exact match, but it will use an exact match if one exists. If range_lookup is TRUE (the default setting) make sure that lookup values in the first row of the table are sorted in ascending order. Otherwise, HLOOKUP may return an incorrect or unexpected value. If range_lookup is FALSE (require exact match), values in the first row of table do not need to be sorted. www.prolearninghub.com