DOLLAR

Text Functions
(4.6/5)

Converts a number to text using currency format, with the currency symbol and thousands separator. Essential for formatting currency values, financial reports, and displaying monetary amounts in Excel.

Interactive Formula Tester

=DOLLAR("1234.56")

Complete Theory & Understanding

Master the fundamentals of Excel DOLLAR function

Core Concept

The DOLLAR function converts numbers to text formatted as currency with the dollar sign ($), thousands separator (comma), and specified decimal places. It's essential for formatting currency values in reports, financial statements, and any display where monetary amounts need to appear as formatted text.

Why Use DOLLAR?

  • Format currency amounts in reports
  • Format numbers for user display
  • Combine currency with text strings
  • Format amounts in invoices

Key Characteristics

Text Output

Returns text, not a number

DOLLAR(1234.56) returns "$1,234.56"

Currency Symbol

Always includes dollar sign

DOLLAR formats with $ prefix

Thousands Separator

Automatically adds comma separators

DOLLAR(1234.56) = "$1,234.56"

Decimal Control

Specify decimal places (default: 2)

DOLLAR(1234.56, 0) = "$1,235"

Function Anatomy

=DOLLAR(parameters...)
Required
Parameters:

Function-specific parameters

Returns
Return Value:

Function-specific return type

Primary Use Cases

Financial Reports

Format currency amounts in reports

Display Formatting

Format numbers for user display

Text Concatenation

Combine currency with text strings

Invoice Generation

Format amounts in invoices

Theory Summary

Precise

Exact matching required

Position-Based

Returns numeric position

Error-Safe

Handles missing text gracefully

Syntax & Parameters

=DOLLAR(number, decimals)
Required
number:

The number to convert to currency text format

Optional
decimals:

The number of digits to the right of the decimal point (default: 2)

Returns
Return Value:

Text string formatted as currency

Description: Converts a number to text using currency format with the currency symbol ($) and thousands separator

Interactive Examples

Basic Currency Format

Convert number to currency text

"1234.56"
=DOLLAR(1234.56)
$1,234.56

Formats number with dollar sign, comma separator, and 2 decimal places

VBA Implementation & Automation

Basic DOLLAR in VBA

Simple VBA implementation of DOLLAR function

' Basic DOLLAR in VBA
Range("B1").Value = Application.WorksheetFunction.Dollar(Range("A1").Value)
' Formats number in A1 as currency text

' Using VBA Dollar function
Dim numValue As Double
numValue = 1234.56
Range("B2").Value = Application.WorksheetFunction.Dollar(numValue)
' Returns: "$1,234.56"

' Format with specific decimals
Sub FormatCurrency()
    Dim cell As Range
    For Each cell In Range("A1:A10")
        If IsNumeric(cell.Value) Then
            cell.Offset(0, 1).Value = Application.WorksheetFunction.Dollar(cell.Value, 2)
        End If
    Next cell
End Sub

' Format with zero decimals
Sub FormatCurrencyNoDecimals()
    Dim cell As Range
    For Each cell In Range("A1:A10")
        If IsNumeric(cell.Value) Then
            cell.Offset(0, 1).Value = Application.WorksheetFunction.Dollar(cell.Value, 0)
        End If
    Next cell
End Sub

Advanced Currency Formatting

Custom currency formatting and validation

' Format currency with validation
Function FormatCurrencySafe(value As Variant, Optional decimals As Integer = 2) As String
    If IsNumeric(value) Then
        FormatCurrencySafe = Application.WorksheetFunction.Dollar(CDbl(value), decimals)
    Else
        FormatCurrencySafe = "$0.00"
    End If
End Function

' Format range of values
Sub FormatRangeAsCurrency()
    Dim cell As Range
    For Each cell In Range("A1:A100")
        If IsNumeric(cell.Value) And cell.Value <> "" Then
            cell.NumberFormat = "$#,##0.00"
            ' Alternative: Use cell formatting instead of DOLLAR
        End If
    Next cell
End Sub

' Compare DOLLAR function vs cell formatting
Sub CompareFormattingMethods()
    Range("A1").Value = 1234.56
    Range("B1").Formula = "=DOLLAR(A1)"
    Range("C1").Value = Range("A1").Value
    Range("C1").NumberFormat = "$#,##0.00"
    ' B1 contains text "$1,234.56"
    ' C1 contains number 1234.56 formatted as currency
End Sub

Business Applications

Financial Reports

Format currency amounts in financial reports

=DOLLAR(A1)

Text Concatenation

Combine currency with text strings

="Total: " & DOLLAR(A1)

Invoice Generation

Format amounts in invoices

=DOLLAR(B1*C1)

Zero Decimals

Format whole currency amounts

=DOLLAR(A1, 0)

Common Issues & Solutions

Cannot Calculate

DOLLAR returns text, so it cannot be used in calculations

=VALUE(DOLLAR(A1))

Solution: Use the original number for calculations, or convert back with VALUE: =VALUE(DOLLAR(A1))

Negative Numbers

DOLLAR formats negative numbers with parentheses or minus sign

=IF(A1<0, "-" & DOLLAR(ABS(A1)), DOLLAR(A1))

Solution: Negative numbers are formatted based on Excel settings. Use ABS and handle signs manually if needed.

Large Numbers

Very large numbers may display in scientific notation before DOLLAR

=DOLLAR(A1)

Solution: Ensure numbers are formatted before applying DOLLAR, or use TEXT function for more control.

Regional Settings

DOLLAR always uses $ symbol regardless of regional settings

=TEXT(A1, "[$-409]#,##0.00")

Solution: Use TEXT function with locale-specific format codes if you need different currency symbols.

Performance Tips & Best Practices

⚡ Performance Optimization

  • Use DOLLAR for display purposes, not in calculations
  • Consider cell number formatting for large ranges
  • Avoid nested DOLLAR functions when possible
  • Use DOLLAR only when text output is specifically needed

🎯 Best Practices

  • Remember DOLLAR returns text, not a number
  • Use cell number formatting for calculations
  • Combine DOLLAR with text for formatted labels
  • Document when DOLLAR vs number formatting is used

💡 Pro Tips

  • DOLLAR always uses $ symbol (US format)
  • Use TEXT function for other currency symbols
  • DOLLAR(1234.56, 0) rounds to nearest dollar
  • Combine with CONCATENATE or & for formatted text strings