Purpose
Return value
Syntax
=DOLLAR(number,decimals)
- number - The number to convert.
- decimals - The number of digits to the right of the decimal point. Default is 2.
Using the DOLLAR function
The DOLLAR function converts a number to text, formatted as currency. The name of the function and the currency symbol used is based on language settings of the computer.
It’s important to understand that DOLLAR returns text and not a number, so the result cannot be used in a numeric calculation. If the goal is simply to format a number as Currency, applying a standard number format is a better option. Video: How to use number formatting .
The DOLLAR function takes two arguments, number and decimals . Number is the number to format, decimals controls how the number is rounded and specifies the number of digits to the right of the decimal point. Decimals is optional and defaults to 2. For example:
=DOLLAR(169.49) // returns "$169.49"
=DOLLAR(169.49,2) // returns "$169.49"
=DOLLAR(169.49,0) // returns "$169"
One use of the DOLLAR function is to concatenate a formatted number to a text string, since number formatting is lost during concatenation. For example, with the number $99.00 in cell A1, formatted as Currency, the following formula does not show Currency:
="The price is "&A1 // returns "The price is 99"
With the DOLLAR function, formatting can be maintained:
="The price is "&DOLLAR(A1) // returns "The price is $99.00"
DOLLAR vs. TEXT
The DOLLAR function is a specialized function to apply Currency formatting only. The TEXT function is a generalized function that does the same thing. TEXT can convert numeric values to text in any number format, including currency, date, time, percentage, and so on.
Notes
- The DOLLAR function converts a number to text using currency number format: $#,##0.00_);($#,##0.00).
- The default for decimals is 2. If decimals is negative, number will be rounded to the left of the decimal point.
- The name of the function and the currency symbol used is based on language settings of the computer.
- The TEXT function is a more flexible way to achieve the same result.
Purpose
Return value
Syntax
=EXACT(text1,text2)
- text1 - The first text string to compare.
- text2 - The second text string to compare.
Using the EXACT function
The EXACT function compares two text strings in a case-sensitive manner. If the two strings are exactly the same, EXACT returns TRUE. If the two strings are not the same (taking into account upper and lower case) EXACT returns FALSE.
The EXACT function takes two arguments , text1 and text2 , which should be valid text strings . If these values are entered directly into the function, they should be enclosed in double quotes ("").
Examples
Below are two examples of the EXACT function used with hardcoded strings. In the first example, the strings are identical, in the second example, the only difference is the capital “A”:
=EXACT("apple","apple") // returns TRUE
=EXACT("Apple","apple") // returns FALSE
In the example shown, the formula in D6, copied down the column, is:
=EXACT(B6,C6)
You can also use a normal equals sign (=) in a formula, but the comparison is not case sensitive:
=("Apple"="apple") // returns TRUE
To count cells that contain specific text, taking into account upper and lower case characters, you can combine EXACT together with the SUMPRODUCT function like this:
=SUMPRODUCT(--EXACT(value,range))
Detailed explanation here .
Notes
- The standard equals to (=) operator is not case-sensitive.
- EXACT is meant for text values, and will convert numeric values to text.