EXACT()

SyntaxEXACT(text1,text2)

Definition. This function checks whether two strings are exactly the same and returns the logical value TRUE or FALSE.

Arguments

Background. You can use the EXACT() function in an array expression to check whether a list contains certain strings. With EXACT(), you can also validate text entered into a form.

This function is case-sensitive but ignores formats.

Example. Assume that after you have entered a list of data, you want to examine the array to check whether it contains a specific character string. The list is entered in the cell range B23:B48, and cell D22 contains the search string. Enter the following formula in a cell:

=OR(EXACT(D22,B23:B48))

and press Ctrl+Shift+Enter. The formula looks like this (see Figure 8-3):

{=OR(EXACT(D22,B23:B48))}

If you use the function as an array expression, you need the OR() function to return a single value from the list.

Using logical functions to determine whether a column contains a string.

Figure 8-3. Using logical functions to determine whether a column contains a string.

Here are a few further examples:

See Also

DELTA(), LEN(), SEARCH()