Aral Code

Functions Lesson 9 of 13

Excel Text and Date Functions

Clean and combine text with TRIM, PROPER, UPPER, LEFT, RIGHT, MID, LEN, CONCAT and TEXTJOIN, and work with dates using TODAY, DATEDIF, YEAR, TEXT and NETWORKDAYS.

Data typed by people is messy: extra spaces, mixed capitals, names in one cell. Text functions clean it up. Date functions compute ages, deadlines and days left.

Cleaning text

ABC
1TypedFormulaResult
2" juan DELA cruz "=PROPER(TRIM(A2))Juan Dela Cruz
3maria clara=UPPER(A3)MARIA CLARA
4SANTOS=LOWER(A4)santos
  • TRIM removes extra spaces at the ends and between words.
  • PROPER capitalizes each word; UPPER and LOWER change everything.

Parts of text

ABC
1ValueFormulaResult
2136728140001=LEFT(A2, 6)136728
309171234567=RIGHT(A3, 4)4567
42026-STEM-045=MID(A4, 6, 4)STEM
5Pilipinas=LEN(A5)9
6Dela Cruz, Juan=FIND(",", A6)10

MID(text, start, length) takes characters from the middle. FIND returns a position, which can feed LEFT and MID: =LEFT(A6, FIND(",", A6)-1) gives "Dela Cruz".

Joining text

ABCD
1FirstLastFormulaResult
2AnaReyes=B2&", "&A2Reyes, Ana
3AnaReyes=CONCAT(A3, " ", B3)Ana Reyes
4AnaReyes=LEFT(A4,1)&LEFT(B4,1)AR

TEXTJOIN(", ", TRUE, A2:A6) joins a whole range with a separator and skips empty cells, perfect for listing all absent students in one cell.

Numbers inside text: TEXT

="Total: ₱"&TEXT(1234.5, "#,##0.00")
="Due: "&TEXT(DATE(2026,12,15), "mmmm d, yyyy")

Results: "Total: ₱1,234.50" and "Due: December 15, 2026". Without TEXT, joining a date shows its serial number, like 46371.

Today and dates

AB
1FormulaResult (on Dec 2, 2026)
2=TODAY()12/2/2026
3=NOW()12/2/2026 14:35
4=YEAR(TODAY())2026
5=DATE(2026, 12, 25)12/25/2026
6=DATE(2026,12,25)-TODAY()23

TODAY() updates every time the file recalculates, so "days left" formulas stay current.

Computing age with DATEDIF

ABC
1NameBirthdayAge
2Juan2011-03-14=DATEDIF(B2, TODAY(), "Y")
3Jose2010-12-19=DATEDIF(B3, TODAY(), "Y")

On December 2, 2026, the ages are 15 and 15 (Jose turns 16 on December 19). "Y" counts complete years; "M" counts months and "D" days. DATEDIF works in Excel and Google Sheets, even though Excel doesn't list it in its function suggestions.

Working days

=NETWORKDAYS(DATE(2026,12,1), DATE(2026,12,18))
=WORKDAY(TODAY(), 10)

NETWORKDAYS counts weekdays between two dates (14 school days from December 1 to 18, 2026); WORKDAY finds the date 10 working days from now. Both can take a third argument: a range of holidays to skip.

Quick Quiz

Check what you learned. Walang grade ito, practice lang. 🙂

1. Which turns " juan DELA cruz " into "Juan Dela Cruz"?
2. What does =RIGHT("09171234567", 4) return?
3. Which formula gives a person's age in years?
4. Why use TEXT when joining a date to text?

By Sir Reyel · Last updated 2026-12-04