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
| A | B | C | |
|---|---|---|---|
| 1 | Typed | Formula | Result |
| 2 | " juan DELA cruz " | =PROPER(TRIM(A2)) | Juan Dela Cruz |
| 3 | maria clara | =UPPER(A3) | MARIA CLARA |
| 4 | SANTOS | =LOWER(A4) | santos |
TRIMremoves extra spaces at the ends and between words.PROPERcapitalizes each word;UPPERandLOWERchange everything.
Parts of text
| A | B | C | |
|---|---|---|---|
| 1 | Value | Formula | Result |
| 2 | 136728140001 | =LEFT(A2, 6) | 136728 |
| 3 | 09171234567 | =RIGHT(A3, 4) | 4567 |
| 4 | 2026-STEM-045 | =MID(A4, 6, 4) | STEM |
| 5 | Pilipinas | =LEN(A5) | 9 |
| 6 | Dela 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
| A | B | C | D | |
|---|---|---|---|---|
| 1 | First | Last | Formula | Result |
| 2 | Ana | Reyes | =B2&", "&A2 | Reyes, Ana |
| 3 | Ana | Reyes | =CONCAT(A3, " ", B3) | Ana Reyes |
| 4 | Ana | Reyes | =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
| A | B | |
|---|---|---|
| 1 | Formula | Result (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
| A | B | C | |
|---|---|---|---|
| 1 | Name | Birthday | Age |
| 2 | Juan | 2011-03-14 | =DATEDIF(B2, TODAY(), "Y") |
| 3 | Jose | 2010-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. 🙂
By Sir Reyel · Last updated 2026-12-04