Export (0) Print
Expand All
Expand Minimize

STRSAME Function

Last modified: June 17, 2011

Applies to: Office 2013 | Visio 2013

In this article
Syntax
Remarks
Example 1
Example 2
Example 3
Example 4
Example 5
Example 6
Example 7

Determines whether strings are the same. It returns TRUE if they are the same and FALSE if they aren't.

STRSAME ("string1", "string2", ignoreCase)

Parameters

Name

Required/Optional

Data Type

Description

string1

Required

String

The first string to compare.

string2

Required

String

The second string to compare.

ignoreCase

Optional

Boolean

TRUE to ignore the case and FALSE to compare the case. The default is FALSE.

Return Value

Boolean

To compare multi-byte strings or to do comparisons using case rules for a specific locale, use the STRSAMEEX function.

STRSAME("cat","dog")

Returns FALSE.

STRSAME("cat","cat")

Returns TRUE.

STRSAME("cat","cat", TRUE)

Returns TRUE.

STRSAME("cat","CAT")

Returns FALSE.

STRSAME("cat","CAT", TRUE)

Returns TRUE.

STRSAME("cät,"CAT", TRUE)

Returns FALSE.

STRSAME("cät,"CÄT", TRUE)

Returns TRUE.

Show:
© 2014 Microsoft