Data Types Excel Understands
After this lesson you can
- Tell text, numbers, dates and logicals apart on sight
- Explain why dates are really numbers
- Diagnose and fix numbers stored as text
Why this matters
This is the most important lesson in Module 2. Numbers stored as text are the single most common data problem in business Excel — your SUM returns the wrong total, no error appears, and nothing on screen looks unusual. Five minutes here saves you from a category of bug that costs people whole afternoons.
How it works
Excel stores five kinds of thing:
| Type | Example | Aligns |
|---|---|---|
| Text | Names, departments, E1001 | Left |
| Number | Anything you'd do maths on | Right |
| Date / Time | Secretly a number — see below | Right |
| Logical | TRUE / FALSE | Centre |
| Error | #N/A, #VALUE! | Centre |
The alignment rule is your free diagnostic. Type something and don't format it. Right-aligned means Excel thinks it's a number or date. Left-aligned means text. A column of left-aligned "numbers" is your bug, found before you started looking.
Dates are numbers wearing a costume
Excel counts days from 1 January 1900. So 1 is 1-Jan-1900, and 12-Sep-2026 is really 46,277. Time is the decimal part: 0.5 is noon, 0.75 is 18:00.
Press Ctrl+Shift+~ on any date to see the number underneath.
This matters practically:
- Subtract them:
=B2-A2gives days between — that's tenure, age, invoice ageing, time-to-hire - Add to them:
=A2+90is ninety days later - Compare them:
=IF(A2>TODAY(),"Future","Past")
None of it works if the date is text. And system exports produce text dates constantly.
Finding text-numbers
=ISNUMBER(E2) TRUE if it's a real number
=ISTEXT(E2) TRUE if it's text
=SUMPRODUCT(--ISTEXT(E2:E250)) how many text cells in the column
Run that last one on every numeric column of a new dataset. Anything other than 0 means SUM will silently skip those rows.
Do it
- In A1:A5, type without formatting:
Anil Kumar·640000·12-Mar-2026·=5>3·=1/0 - Observe: A1 left, A2 right, A3 right, A4 centred showing
TRUE, A5 showing#DIV/0!. - Select A3 and press Ctrl+Shift+~. The date becomes 46093. That's what a date actually is. Press Ctrl+Z.
Create the bug and find it
- In B1 type
500. In B2 type'500— the leading apostrophe forces text. - B1 is right-aligned; B2 is left-aligned with a small green triangle.
- In B3:
=SUM(B1:B2). It returns 500, not 1000. The text value was ignored. - In B4:
=ISNUMBER(B2)→ FALSE. That's your test.
Four ways to fix it
- The green triangle — select the cells, click the yellow warning icon, choose Convert to Number. Quickest for a few cells.
- Text to Columns — select the column, Data → Text to Columns → Next → Next → Finish. Four clicks, works on a whole column, no formula. This is the one to use.
- Paste Special Multiply — type
1somewhere, copy it, select the text-numbers, Ctrl+Alt+V → Multiply. Works when the others don't. - VALUE() in a helper column —
=VALUE(B2), then Paste Values back over the original.
Text dates
- If
12-03-2021is left-aligned, it's text.=TODAY()-D2returns#VALUE!. - Fix with Text to Columns, and at step 3 choose Date and set the order to DMY explicitly.
That explicit order matters: 03/04/2026 is ambiguous, and DATEVALUE guesses from your regional settings — silently producing the wrong date for every row.
Shortcuts
| Shortcut | What it does | When to use it | Example |
|---|---|---|---|
Ctrl + Shift + ~ | Applies General format — strips the display mask | The fastest truth-teller in Excel. A date becomes a number; text stays looking like text. | Diagnosing any suspicious cell |
Ctrl + ; | Inserts today's date as a static value | Recording when something happened — a date received, an approval | Never =TODAY() for this |
Ctrl + Shift + 3 | Date format | Turning a serial back into a readable date | After DATEVALUE |
Watch out
| Mistake | What you see | Fix |
|---|---|---|
| Assuming a number is a number | SUM returns 0 or a short total, silently | Check alignment; run SUMPRODUCT(--ISTEXT(range)) |
Typing 1,20,000 with separators by hand | It becomes text | Type 120000 and apply a format |
=TODAY() for a permanent record date | Every historic record shows today, forever | Ctrl+; |
Storing 0012345 as a number | Leading zeros vanish | Format the column as Text before entry |
DATEVALUE on ambiguous dates | Wrong by a month/day swap, on every row | Text to Columns with the order stated |
| Mixing text and numbers in one column | Sorting produces nonsense; lookups fail | One data type per column |
| Storing a number and its unit together | 640000 INR is text and will never sum | Number in one column, unit in the header |
Practice
Practice
Scenario
Validate an HR export before building anything on it.
Dataset: HR Employee Master
Download starter fileEnter this exactly — the values in E6:E8 need a leading apostrophe to simulate text-numbers.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | EmpID | Name | Dept | DOJ | CTC |
| 2 | E1001 | Anil Kumar | Sales | 12-Mar-2021 | 640000 |
| 3 | E1002 | Meera Nair | HR | 05-Jul-2022 | 520000 |
| 4 | E1003 | Rahul Shah | Sales | 19-Jan-2020 | 810000 |
| 5 | E1004 | Sneha Rao | Finance | 28-Sep-2023 | 470000 |
| 6 | E1005 | Kabir Menon | Ops | 03-Feb-2024 | '590000 |
| 7 | E1006 | Divya Iyer | Sales | 14-Nov-2021 | '725000 |
| 8 | E1007 | Arjun Das | HR | 22-Jun-2022 | '480000 |
Your task
- In G1, total the CTC column. What do you get, and what should it be?
- In G2, count how many CTC cells are text.
- Identify the problem rows by alignment alone.
- Fix them with Text to Columns. Re-check G1 and G2.
- In F2, calculate each employee's tenure in days from DOJ to today, filled down. Excel may format the result oddly — what do you press to see the actual number?
- In G4, show the underlying serial number of the DOJ in D2 without changing that cell.
- In G5, write a formula returning TRUE only if every value in E2:E8 is now a number.
What you should end up with
Step 1: 2,440,000 — should be 4,235,000 · Step 2: 3 · Step 3: rows 6, 7, 8 are left-aligned with green triangles · Step 5: press Ctrl+Shift+~
Quiz
Question 1 of 3 · Multiple choice
