The document provides an overview of Excel functions, focusing on named ranges, the IF function, and various lookup functions such as VLOOKUP and HLOOKUP. It explains how to create named ranges, use conditional logic with IF, and combine functions like INDEX and MATCH for advanced data retrieval. Additionally, it covers error handling with IFERROR and the use of COUNTIF and SUMIF for conditional counting and summation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
12 views20 pages
Unit 4
The document provides an overview of Excel functions, focusing on named ranges, the IF function, and various lookup functions such as VLOOKUP and HLOOKUP. It explains how to create named ranges, use conditional logic with IF, and combine functions like INDEX and MATCH for advanced data retrieval. Additionally, it covers error handling with IFERROR and the use of COUNTIF and SUMIF for conditional counting and summation.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20
UNIT 4:
Working With Excel’s
Conditional And LookUp Function SUBMITTED BY: PRACHYODITA KAR (24117004) B.A. PSYCHOLOGY SCHOOL OF LIBERAL STUDIES Submitted to: Prof. somnath kumar mishra NAME RANGES In Excel, a named range is a range of cells that has been given a specific name. This can make formulas and references easier to read and understand. Here are some benefits and uses of named ranges: Easier to read formulas: Instead of using cell references like $A$1:$B$10, you can use a named range like SalesData. Simplifies complex formulas: Named ranges can break down complex formulas into more manageable parts. Improves formula consistency: Using named ranges ensures consistency in formulas across worksheets. Enhances flexibility: Named ranges can be easily updated or changed without affecting formulas. CREATING A NAMED RANGE IN EXCEL: 1. Select the range of cells. 2. Go to the "Formulas" tab. 3. Click "Define Name" and enter the name. IF() FUNCTION The IF() function is a fundamental construct in programming, used for conditional logic. Here's a brief overview: Purpose: The if() function allows you to execute a block of code only if a specific condition is met. How it works: 1. The condition is evaluated as true or false. 2. If the condition is true, the code inside the if block is executed. 3. If the condition is false, the code inside the if block is skipped. Common use cases: Validating user input Handling errors Implementing logic based on specific conditions Controlling program flow Syntax: IF(Logical_test, Value_)if_true, [Value_if_false]) EXAMPLE: “=IF(C2<40,"YES","NO")” works: 1. C2 is the cell containing the grade. 2. <40 is the condition. If the grade is less than 40, the student gets grace marks. 3. "YES" is returned if the condition is true (grade < 40). 4. "NO" is returned if the condition is false (grade ≥ 40). NESTING FUNCTIONS Nesting functions in spreadsheets allows you to perform more complex calculations by embedding one function within another. EXAMPLE: Suppose you want to evaluate student grades with the following criteria: 1. Grade < 40: "Fail" 2. Grade ≥ 40 and < 70: "Pass" 3. Grade ≥ 70: "Excellent" 4. You can use nested IF() functions like this: =IF(C2<40, "Fail", IF(C2<70, "Pass", "Excellent")) NESTING EXCEL’S AND() FUNCTION WITHIN THE IF() FUNCTION: Nesting the IF function with the AND function in Excel allows you to test multiple conditions before returning a result. Syntax: =IF(AND(Logical1, Logical2), value_if_true, value_if_false) Let's use the formula: =IF(AND(C2>50, G2<5), "YES", "NO") Here: 1. C2>50 checks if the Grade is greater than 50. 2. G2<5 checks if the Rank is less than 5. 3. If both conditions are met (Grade > 50 and Rank < 5), the result is "YES". Otherwise, it's "NO". USING EXCEL’S FUNCTIONS 1. COUNTIF()- The COUNTIF function in Excel counts the number of cells in a range that meet a specified condition. Syntax: =COUNTIF(range, criteria) USING EXCEL’S FUNCTIONS 2. SUMIF()- The SUMIF function in Excel sums the values in a range that meet a specified condition. Syntax: =SUMIF(range, criteria, [sum_range]) IFERROR FUNCTIONS Some common uses of the IFERROR function: 1. Hiding error messages: Replace error codes like #N/A, #DIV/0!, or #VALUE! with a custom message or value. 2. Returning a default value: Use IFERROR to return a specific value, like 0 or blank, when a formula results in an error. 3. Simplifying formulas: Wrap complex formulas with IFERROR to handle potential errors and make your spreadsheet more user- friendly. Common error types IFERROR can handle: #N/A #DIV/0! #VALUE! #REF! #NAME? VLOOKUP() FUNCTION The VLOOKUP function in Excel searches for a value in a table and returns a corresponding value from another column. Syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) HLOOKUP() FUNCTION The HLOOKUP function in Excel searches for a value in a row and returns a corresponding value from another row. Syntax: =HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup]) INDEX() FUNCTION The INDEX function in Excel returns a value at a specified position in a range. Syntax: =INDEX(range, row_num, [column_num]) MATCH() FUNCTION The MATCH function in Excel returns the relative position of a value within a range. Syntax: =MATCH(lookup_value, lookup_array, [match_type]) INDEX() AND MATCH() FUNCTIONS COMBINED The INDEX and MATCH functions can be combined to create a powerful lookup formula in Excel. Syntax: =INDEX(return_range, MATCH(lookup_value, lookup_range, [match_type])) DYNAMIC HLOOKUP() WITH THE MATCH() FUNCTION You can create a dynamic HLOOKUP with the MATCH function to search for a value in a row and return a corresponding value from another row. Syntax: =INDEX(return_range, row_num, MATCH(lookup_value, header_range, 0)) THANK YOU