Assignment no:6 vlookup in ms excel

VLOOKUP is a powerful Excel function that allows you to search for a value in a table and return a corresponding value from another column. Here's the syntax and some examples:


# Syntax

VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])


# Arguments

1. *lookup_value*: The value you want to search for.

2. *table_array*: The range of cells that contains the data you want to search.

3. *col_index_num*: The column number that contains the value you want to return.

4. *[range_lookup]*: Optional. Set to FALSE for an exact match, or TRUE for an approximate match.


# Examples

Suppose we have a table with employee data:


| Employee ID | Name | Department |

| --- | --- | --- |

| 101 | John Smith | Sales |

| 102 | Jane Doe | Marketing |

| 103 | Bob Johnson | IT |


*Example 1: Exact Match*

Find the department for employee ID 102:


`=VLOOKUP(102, A2:C4, 3, FALSE)`


Returns: Marketing


*Example 2: Approximate Match*

Find the department for employee ID 104 (which doesn't exist):


`=VLOOKUP(104, A2:C4, 3, TRUE)`


Returns: #N/A (because there's no approximate match)


*Example 3: Searching by Name*

Find the department for employee "John Smith":


`=VLOOKUP("John Smith", A2:C4, 3, FALSE)`


Returns: Sales


# Tips and Variations

- Use `INDEX` and `MATCH` functions for more flexibility and power.

- Use `VLOOKUP` with multiple criteria using the `&` operator.

- Use `VLOOKUP` with wildcard characters (`*`, `?`) for partial matches.

Comments

Popular posts from this blog

Assignment no:3 Remove duplicate data

Aaignment :5 flash fill in me excel