← Learning Hub
Beginner

Text and Date Functions

Text

Data copied from websites, other software or forms is often messy: extra spaces, mixed CAPITALS, names and surnames in one cell, codes joined with text. Text functions clean and reshape it without retyping. Clean data matters because lookups and filters fail when "Delhi" and "Delhi " (with a space) look the same to you but different to Excel.

Example
A2 = "  smart watch "      B2 = "SAVE10"

=TRIM(A2)              → smart watch      (removes extra spaces)
=UPPER(TRIM(A2))       → SMART WATCH
=PROPER(TRIM(A2))      → Smart Watch
=LEN(B2)               → 6
=LEFT(B2, 4)           → SAVE
=RIGHT(B2, 2)          → 10
=TEXTJOIN(", ", TRUE, "Pen", "Book", "Bag")   → Pen, Book, Bag
="Code: " & B2         → Code: SAVE10     (& joins text)

Dates

Excel stores a date as a number, so you can add and subtract days.

Behind the scenes, each date is a number: the count of days since 1 January 1900. That's why you can subtract two dates to get the days between them (delivery time, overdue days, age), or add 30 to a date to get a due date. The cell's format decides whether you see 46345 or 19-Nov-2026.

Example
A2 = 19-Nov-2026  (order date)

=TODAY()                        → today's date
=A2+4                           → 23-Nov-2026
=TEXT(A2+4, "dd mmm yyyy")      → 23 Nov 2026
=WEEKDAY(A2+4, 2)               → 1   (Monday = 1)
=WORKDAY(A2, 4)                 → 25-Nov-2026 (skips Sat and Sun)
=DATEDIF(A2, DATE(2026,12,31), "d")   → 42
If a date shows as a number like 46345, change the cell format to Date (Home tab, Number group).
Key points
  • TRIM, UPPER, LOWER, PROPER, LEFT, RIGHT, MID clean text.
  • Join text with & or TEXTJOIN.
  • Dates are numbers, so you can add and subtract them.
  • TODAY() gives today's date.

📝 Test yourself

1. Which function removes extra spaces?
2. Which symbol joins two pieces of text?
3. Fill in the function that gives today's date:
=()