top of page

You are learning Functions and Formulas in MS Excel

How do I find the position of a value within a range with MATCH?

You can find the position of a value within a range using the MATCH function in Excel. Here's how:

Syntax:

```excel
=MATCH(lookup_value, lookup_array, match_type)
```

Arguments:

* lookup_value: The value you want to find the position of. This can be a number, text, or a reference to a cell containing the value.
* lookup_array: The range of cells you want to search in. This can be a cell range (e.g., A1:A10) or a named range.
* match_type (optional): This argument specifies how the function should match the lookup_value. It can be:
* 0 (exact match): (Default) Finds the first exact match of the lookup_value in the lookup_array. If no match is found, it returns #N/A.
* 1 (larger or equal): Finds the first value in the lookup_array that is greater than or equal to the lookup_value. If no value is greater than or equal, it returns #N/A.
* -1 (smaller or equal): Finds the first value in the lookup_array that is less than or equal to the lookup_value. If no value is less than or equal, it returns #N/A.

Example:

Let's say you have a list of names in cells A1:A10 and you want to find the position of the name "John" in the list. You can use the following formula:

```excel
=MATCH("John", A1:A10, 0)
```

This formula will search for the exact match of "John" in the range A1:A10. If "John" is found in the list, the function will return the position (row number) where it's found. For example, if "John" is in cell A5, the formula will return 5.

Tips:

* The MATCH function is case-sensitive by default. If you want to perform a case-insensitive search, you can combine it with the EXACT function.
* You can use wildcards (* and ?) with the lookup_value argument for partial matches when using match_type = 0 (exact match).

Remember, MATCH returns the position of the value, not the value itself. You can use the INDEX function along with MATCH to retrieve the actual value based on its position.

bottom of page