EXACT()

SyntaxEXACT(text1,text2)

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

Arguments

  • text1 (required). The first string to be compared.

  • text2 (required). The second string to be compared.

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:

  • =EXACT("Microsoft Excel","Microsoft excel") returns FALSE.

  • =EXACT("steamboat","steamboats") returns FALSE.

  • =EXACT("gazelle","gazelle") returns TRUE.

  • =EXACT("John Smith","Jeff Smith") returns FALSE.

See Also

DELTA(), LEN(), SEARCH()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.12.11