Excel data types: numbers, text, dates and logical values
How Excel tells numbers, text, dates and TRUE/FALSE apart, and why “numbers stored as text” silently break SUM — with examples.
Whatever you type into a cell, Excel first decides its type: number, text, date or logical value (TRUE/FALSE). Formulas work by type: numbers are added, text is joined, dates are subtracted.
That is why two cells can look identical while one is calculated and the other is not. It is one of the most common — and most time-consuming — mistakes in Excel.
How to tell the type
Excel gives a hint through alignment (unless you set alignment yourself):
- Numbers and dates stick to the right edge.
- Text sticks to the left edge.
- TRUE / FALSE are centered.
- Errors (#N/A, #VALUE!) are centered.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Type | Value | Note | |
| 2 | Number | 125000 | right | |
| 3 | Text | Tashkent | left | |
| 4 | Date | 01.01.2025 | really a number | |
| 5 | Logical | ИСТИНА | center | |
| 6 | Number as text | 1250001 | left! | |
| 7 |
Checking a cell’s type — 3 ways
1
Select the cell and look at its alignment: numbers sit on the right, text on the left.
2
Select several cells and look at the status bar at the bottom. Sum and Average only use numbers, while Count counts everything. If Count is 4 but fewer values made it into Sum, there is text among them.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Price | |||
| 2 | 12000 | |||
| 3 | 8000 | |||
| 4 | 150002 | |||
| 5 | 5000 | |||
| 6 |
3
Add a helper formula: =ЕЧИСЛО(A2) returns TRUE for a number and FALSE for text. Fill it down and check a whole column in a second.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Price | Number? | ||
| 2 | 12000 | ИСТИНА | ||
| 3 | 8000 | ИСТИНА | ||
| 4 | 15000 | ЛОЖЬ | ||
| 5 | 5000 | ИСТИНА | ||
| 6 |
A date is really a number
Excel stores a date as the number of days since January 1, 1900: 01.01.2025 is 45658. Formatting only changes how it looks. That is why you can subtract dates to get the number of days between them: =B2-A2.
Time is a fraction of a day: 12:00 is 0.5, 18:00 is 0.75.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Start | End | Days | |
| 2 | 01.01.2025 | 31.01.2025 | 30 | |
| 3 | 12.02.2025 | 28.02.2025 | 16 | |
| 4 | ||||
| 5 |
Pro level: codes with leading zeros
Excel treats a product code like 00125 or a phone number as a number and drops the leading zeros. Two ways around it:
- Type an apostrophe first:
'00125— the cell keeps 00125 (the apostrophe is hidden) and is now text. - If you never calculate with the code, give the column the Text format beforehand (Число group → Text).
Rule of thumb: what you calculate is a number; codes, phones and IDs are text.
Try it in the simulator
Column B has prices, but B4 holds text. Type =ЕЧИСЛО(B2) in C2 and fill it down to C5, then type =СУММ(B2:B5) in B6 and see why the result is 25000.
| A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Product | Price | Number? | |||||||||||||||||||||
| 2 | Bread | 12000 | ||||||||||||||||||||||
| 3 | Milk | 8000 | ||||||||||||||||||||||
| 4 | Yogurt | 15000 | ||||||||||||||||||||||
| 5 | Eggs | 5000 | ||||||||||||||||||||||
| 6 | Total | |||||||||||||||||||||||
| 7 | ||||||||||||||||||||||||
| 8 | ||||||||||||||||||||||||
| 9 | ||||||||||||||||||||||||
| 10 |
Has ExcelLab been useful?
Support the project and help us release new lessons and exercises.