Skip to content
SkillSopan
Lesson 2.212 minFree

Data Types Excel Understands

Keys you'll useCtrlShift~Ctrl;

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:

TypeExampleAligns
TextNames, departments, E1001Left
NumberAnything you'd do maths onRight
Date / TimeSecretly a number — see belowRight
LogicalTRUE / FALSECentre
Error#N/A, #VALUE!Centre
Screenshot 2.2.1 from this lesson

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-A2 gives days between — that's tenure, age, invoice ageing, time-to-hire
  • Add to them: =A2+90 is 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

Formula
=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

  1. In A1:A5, type without formatting: Anil Kumar · 640000 · 12-Mar-2026 · =5>3 · =1/0
  2. Observe: A1 left, A2 right, A3 right, A4 centred showing TRUE, A5 showing #DIV/0!.
  3. Select A3 and press Ctrl+Shift+~. The date becomes 46093. That's what a date actually is. Press Ctrl+Z.
Screenshot 2.2.2 from this lesson

Create the bug and find it

  1. In B1 type 500. In B2 type '500 — the leading apostrophe forces text.
  2. B1 is right-aligned; B2 is left-aligned with a small green triangle.
  3. In B3: =SUM(B1:B2). It returns 500, not 1000. The text value was ignored.
  4. In B4: =ISNUMBER(B2) → FALSE. That's your test.
Screenshot 2.2.3 from this lesson

Four ways to fix it

  1. The green triangle — select the cells, click the yellow warning icon, choose Convert to Number. Quickest for a few cells.
  2. 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.
  3. Paste Special Multiply — type 1 somewhere, copy it, select the text-numbers, Ctrl+Alt+V → Multiply. Works when the others don't.
  4. VALUE() in a helper column — =VALUE(B2), then Paste Values back over the original.
Screenshot 2.2.4 from this lesson

Text dates

  1. If 12-03-2021 is left-aligned, it's text. =TODAY()-D2 returns #VALUE!.
  2. Fix with Text to Columns, and at step 3 choose Date and set the order to DMY explicitly.
Screenshot 2.2.5 from this lesson

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

ShortcutWhat it doesWhen to use itExample
Ctrl + Shift + ~Applies General format — strips the display maskThe 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 valueRecording when something happened — a date received, an approvalNever =TODAY() for this
Ctrl + Shift + 3Date formatTurning a serial back into a readable dateAfter DATEVALUE

Watch out

MistakeWhat you seeFix
Assuming a number is a numberSUM returns 0 or a short total, silentlyCheck alignment; run SUMPRODUCT(--ISTEXT(range))
Typing 1,20,000 with separators by handIt becomes textType 120000 and apply a format
=TODAY() for a permanent record dateEvery historic record shows today, foreverCtrl+;
Storing 0012345 as a numberLeading zeros vanishFormat the column as Text before entry
DATEVALUE on ambiguous datesWrong by a month/day swap, on every rowText to Columns with the order stated
Mixing text and numbers in one columnSorting produces nonsense; lookups failOne data type per column
Storing a number and its unit together640000 INR is text and will never sumNumber 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 file

Enter this exactly — the values in E6:E8 need a leading apostrophe to simulate text-numbers.

ABCDE
1EmpIDNameDeptDOJCTC
2E1001Anil KumarSales12-Mar-2021640000
3E1002Meera NairHR05-Jul-2022520000
4E1003Rahul ShahSales19-Jan-2020810000
5E1004Sneha RaoFinance28-Sep-2023470000
6E1005Kabir MenonOps03-Feb-2024'590000
7E1006Divya IyerSales14-Nov-2021'725000
8E1007Arjun DasHR22-Jun-2022'480000

Your task

  1. In G1, total the CTC column. What do you get, and what should it be?
  2. In G2, count how many CTC cells are text.
  3. Identify the problem rows by alignment alone.
  4. Fix them with Text to Columns. Re-check G1 and G2.
  5. 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?
  6. In G4, show the underlying serial number of the DOJ in D2 without changing that cell.
  7. 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

A column of salary figures is left-aligned. What does that most likely mean?

Reading is free. Sign in to save progress.