RIGHT

Beginner

Text

Extracts a specified number of characters from the end of a text string.

Syntax
=RIGHT(text, [num_chars])
Parameters
text
Required
(text)

Text string to extract from

num_chars(number)

Number of characters to extract (default: 1)

Examples
Real-world examples to help you understand how to use RIGHT

Extract file extension

=RIGHT(A1, 3)

Gets last 3 characters (e.g., "pdf")

Result: Extension

Get last 4 digits

=RIGHT(A1, 4)

Extracts last 4 digits of credit card

Result: Last 4 digits

Extract year

=RIGHT(A1, 4)

Gets year from date string "12/31/2024"

Result: 2024

Common Use Cases
  • Extract file extensions
  • Get last digits of IDs
  • Parse suffixes
  • Extract year from dates
  • Validate check digits
Pro Tips
  • 💡If num_chars omitted, extracts 1 character
  • 💡If num_chars > text length, returns entire text
  • 💡Combine with LEN for dynamic extraction
  • 💡Useful for fixed-format data
Common Errors
  • ⚠️Negative num_chars (returns #VALUE!)
  • ⚠️Not accounting for varying text lengths
  • ⚠️Assuming fixed positions
Related Formulas

Need a Custom RIGHT Formula?

Our AI can generate tailored formulas based on your specific needs

Generate Custom Formula