UNICHAR

Text Functions
(4.7/5)

Returns the Unicode character that is referenced by the given numeric value. Supports full Unicode character set (beyond ASCII). Essential for working with international characters, emojis, and extended character sets in Excel.

Interactive Formula Tester

=UNICHAR("65")

Complete Theory & Understanding

Master the fundamentals of Excel UNICHAR function

Core Concept

The UNICHAR function converts Unicode character codes (1-1114111) to their corresponding characters. It extends beyond CHAR function by supporting the full Unicode character set, including emojis, international characters, mathematical symbols, and special characters. Essential for modern text processing and internationalization.

Why Use UNICHAR?

  • Generate emojis from Unicode codes
  • Work with international characters
  • Generate mathematical and special symbols
  • Map Unicode codes to characters

Key Characteristics

Full Unicode Support

Supports Unicode range 1-1114111

UNICHAR(128512) returns πŸ˜€

Emoji Support

Can generate emojis and symbols

UNICHAR(128512) = πŸ˜€

International Characters

Supports all international characters

UNICHAR(20013) = δΈ­

Extended Range

Beyond ASCII range of CHAR

UNICHAR supports 1-1114111 vs CHAR 1-255

Function Anatomy

=UNICHAR(parameters...)
Required
Parameters:

Function-specific parameters

Returns
Return Value:

Function-specific return type

Primary Use Cases

Emoji Generation

Generate emojis from Unicode codes

International Text

Work with international characters

Special Symbols

Generate mathematical and special symbols

Character Mapping

Map Unicode codes to characters

Theory Summary

Precise

Exact matching required

Position-Based

Returns numeric position

Error-Safe

Handles missing text gracefully

Syntax & Parameters

=UNICHAR(number)
Required
number:

The Unicode number of the character. Must be between 1 and 1114111.

Returns
Return Value:

Unicode character

Description: Returns the Unicode character referenced by the numeric value (supports full Unicode range)

Interactive Examples

Basic Unicode Character

Convert Unicode code to character

"65"
=UNICHAR(65)
A

Unicode 65 corresponds to uppercase letter 'A' (same as ASCII)

VBA Implementation & Automation

Basic UNICHAR in VBA

Simple VBA implementation of UNICHAR function

' Basic UNICHAR in VBA
Range("B1").Value = Application.WorksheetFunction.Unichar(65)
' Returns: "A"

' Using VBA Unichar function
Dim unicodeCode As Long
unicodeCode = 128512
Range("B2").Value = Application.WorksheetFunction.Unichar(unicodeCode)
' Returns: πŸ˜€

' Generate emojis
Sub GenerateEmojis()
    Range("A1").Value = Application.WorksheetFunction.Unichar(128512) ' πŸ˜€
    Range("A2").Value = Application.WorksheetFunction.Unichar(128513) ' 😁
    Range("A3").Value = Application.WorksheetFunction.Unichar(128514) ' πŸ˜‚
End Sub

' Generate international characters
Sub GenerateInternationalChars()
    Range("A1").Value = Application.WorksheetFunction.Unichar(8364) ' €
    Range("A2").Value = Application.WorksheetFunction.Unichar(165) ' Β₯
    Range("A3").Value = Application.WorksheetFunction.Unichar(163) ' Β£
End Sub

Advanced Unicode Character Generation

Generate ranges of Unicode characters

' Function to get Unicode character safely
Function GetUnichar(code As Long) As String
    On Error Resume Next
    If code >= 1 And code <= 1114111 Then
        GetUnichar = Application.WorksheetFunction.Unichar(code)
    Else
        GetUnichar = "#VALUE!"
    End If
    On Error GoTo 0
End Function

' Generate emoji range
Sub GenerateEmojiRange()
    Dim i As Long
    Dim startCode As Long
    Dim endCode As Long
    startCode = 128512 ' First emoji
    endCode = 128590 ' Last emoji in common range
    
    Dim row As Integer
    row = 1
    For i = startCode To endCode
        Range("A" & row).Value = Application.WorksheetFunction.Unichar(i)
        row = row + 1
    Next i
End Sub

' Convert Unicode code list to characters
Sub ConvertUnicodeList()
    Dim codes() As Variant
    codes = Array(65, 66, 67, 8364, 128512)
    Dim i As Integer
    For i = 0 To UBound(codes)
        Range("A" & (i + 1)).Value = Application.WorksheetFunction.Unichar(codes(i))
    Next i
End Sub

Business Applications

Emoji Generation

Generate emojis from Unicode codes

=UNICHAR(128512)

International Characters

Work with international characters

=UNICHAR(8364)

Special Symbols

Generate mathematical symbols

=UNICHAR(8734)

Character Mapping

Map Unicode codes to characters

=UNICHAR(A1)

Common Issues & Solutions

#VALUE! Error

UNICHAR returns #VALUE! when number is out of range

=IF(AND(A1>=1, A1<=1114111), UNICHAR(A1), "#VALUE!")

Solution: Ensure number is between 1 and 1114111. Use IF to validate: =IF(AND(number>=1, number<=1114111), UNICHAR(number), "#VALUE!")

Character Not Displaying

Unicode character may not display if font doesn't support it

=UNICHAR(128512)

Solution: Ensure font supports the Unicode character. Some characters require specific fonts or Unicode-compatible fonts.

Invalid Character

Some Unicode codes are reserved or invalid

=UNICHAR(code)

Solution: Not all codes in range 1-1114111 are valid characters. Some are control characters or unassigned.

Excel Version

UNICHAR requires Excel 2013 or later

=CHAR(A1) for older versions

Solution: Use CHAR for older Excel versions, or upgrade to Excel 2013+. CHAR only supports 1-255.

Performance Tips & Best Practices

⚑ Performance Optimization

  • β€’ Use UNICHAR efficiently for Unicode characters
  • β€’ Cache UNICHAR results when used multiple times
  • β€’ Consider font compatibility for display
  • β€’ Use CHAR for ASCII range (1-255) for better compatibility

🎯 Best Practices

  • β€’ Use UNICHAR for characters beyond ASCII range
  • β€’ Validate Unicode codes are in valid range (1-1114111)
  • β€’ Ensure fonts support Unicode characters for display
  • β€’ Document Unicode code usage for team understanding

πŸ’‘ Pro Tips

  • β€’ UNICHAR(128512) = πŸ˜€, UNICHAR(128513) = 😁 (common emojis)
  • β€’ UNICHAR(8364) = €, UNICHAR(165) = Β₯ (currency symbols)
  • β€’ UNICHAR supports full Unicode vs CHAR (ASCII only)
  • β€’ Use UNICODE function to find character codes