Ravindra BagaleCourses & study guides Track your progress

Excel TYPE Function

Chala mitrano — today TYPE. What kind of value is this — number, text, logical, error, array?

Fictional sample data for learning. Type audits for Madurai data dumps and Toronto ETL checks.

Purpose

Return a type code for a value: 1 number, 2 text, 4 logical, 16 error, 64 array.

Return value

A type-code number.

Syntax

TYPE(value)

Arguments

ArgumentRequired?Description
valueRequiredValue or cell to classify.

Version

All modern Excel versions. LibreOffice Calc and Google Sheets have matching or close equivalents.

How to use — Why → What → How

Why: One code instead of four IS* tests. Handy in data-quality dashboards. Type audits for Madurai data dumps and Toronto ETL checks.

What: TYPE codes: 1=number, 2=text, 4=logical, 16=error, 64=array. Blank often returns 1 in some contexts — verify; prefer ISBLANK for emptiness. Info functions are the seatbelts of messy imports: they tell you what kind of value you have before you compute. Prefer the narrow test (ISNA, ISBLANK) when you need precision; use ISERROR or TYPE when you need a broad gate. Always verify blanks versus empty strings versus zeros — they look alike on screen and fail differently in formulas. For CELL and INFO, treat format/environment codes as build-specific and document ‘verify on your Excel’ in class notes.

How — numbered steps:

  1. Type =TYPE(A2).
  2. Map codes with SWITCH/IFS.
  3. Do not use TYPE alone to detect blanks.

Ravindra Bagale's Tip

Friends, after TYPE, find one column or range in a real workbook this week where this lesson saves time.

Ravindra Bagale's Tip

Friends, sleep on TYPE; rebuild example 1 tomorrow without looking.

Ravindra Bagale's Tip

Friends, say the business question in plain words before =TYPE.

Ravindra Bagale's Tip

Friends, check a known case with a calculator before you trust a long TYPE chain.

Ravindra Bagale's Tip

Friends, after you finish TYPE, open yesterday’s real workbook and find one place this function would have saved ten minutes.

Ravindra Bagale's Tip

Friends, treat blank, zero, and empty text as three different animals when you use TYPE.

Download practice file: practice-type.xlsx (includes sheet About this data, practice sheets, and Answers).

Worked examples

1) Number

Madurai.

X
10
Formula: =TYPE(A2)

Result: 1

What it means: Number → 1.

2) Text

Name.

X
Asha
Formula: =TYPE(A2)

Result: 2

What it means: Text → 2.

3) Logical

Flag.

X
True
Formula: =TYPE(A2)

Result: 4

What it means: Logical → 4.

4) Error

NA.

#
Formula: =TYPE(NA())

Result: 16

What it means: Error → 16.

5) Toronto map

Label.

X
10
Formula: =IFS(TYPE(A2)=1,"num",TYPE(A2)=2,"text")

Result: num

What it means: Human label.

6) Text digits

Trap.

X
9
Formula: =TYPE(A2)

Result: 2

What it means: Still text → 2.

Common errors and fixes

Blank ambiguity — Not a clean emptiness test. Fix: Use ISBLANK.
Arrays — 64 in dynamic Excel. Fix: Spills.
Remember codes — 1/2/4/16/64. Fix: Card them.

Notes and tips

  • Revisit the TYPE errors table after the quiz.
  • Build example 1 from memory on a blank sheet.
  • Check number vs text if a result looks wrong.
  • Teach one tip in Marathi or Hindi this week.
  • Keep currency symbols consistent inside one report column (practice mixes ₹ $ £ €).
  • Drill: map TYPE codes to labels with IFS from memory.
  • TYPE vs IS* family: one code versus dedicated booleans.
  • Fictional sample data only — names and amounts are for learning.
  • Print the TYPE revision card for one week of real worksheets.
  • Ask juniors to predict before they press Enter.
  • Track your top mistake with this function monthly.
  • Type audits for Madurai data dumps and Toronto ETL checks.
  • Interview tip: explain the business question before the formula.
  • Classroom drill: invent three brand-new formulas from your city without the page open.
  • If a result looks wrong, check blanks vs zeros before rewriting.
  • When Excel versions differ, note the LibreOffice / Sheets fallback in a cell comment.
  • Prefer clear ranges over whole-column refs on huge sheets if speed matters.
  • Document units (₹, kg, days) in the header so totals stay honest.
  • Distinguish blank, "", 0, and text "0" before you trust any IS* result.
  • Prefer IFNA for lookup misses and IFERROR for broad display substitutes.
  • TYPE codes: 1 number, 2 text, 4 logical, 16 error, 64 array — card them.
  • ERROR.TYPE: 2=#DIV/0!, 7=#N/A — card the rest for audits.
  • Always pass a reference to CELL; omitting it is volatile and confusing in shared books.
  • INFO and some CELL format codes vary by host — flag uncertain in lesson notes.
  • SHEETS includes hidden sheets; unhide before trusting a QA count.
  • Fictional sample data only — never paste real customer sheets into class files.
  • Teach one junior blank-vs-zero in Marathi or Hindi this week.
  • Print the revision card and stick it near the monitor for one week of real worksheets.

In real work

Drill: map TYPE codes to labels with IFS from memory. Type audits for Madurai data dumps and Toronto ETL checks. Classroom drill: write three brand-new TYPE formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known case before trusting a long chain. Keep a personal notebook of the one mistake you make most often with this function; review it monthly. The IS* family returns booleans you can nest in IF; IFERROR/IFNA are the modern display wrappers when you only need a substitute value. TYPE collapses several tests into codes 1/2/4/16/64. N coerces logicals for SUMPRODUCT-era maths but does not parse digit-text — that is VALUE. NA() forces chart gaps; ERROR.TYPE triage codes let support count #DIV/0! separately from #N/A. SHEET/SHEETS index and count tabs including hidden ones — QA asserts love SHEETS()=n gates.

How it compares

TYPE vs IS* family: one code versus dedicated booleans.

Interview corner

Codes?
1/2/4/16/64.
vs ISNUMBER?
Code vs boolean.
Blank?
Prefer ISBLANK.

ISNUMBER, ISTEXT, ISLOGICAL, ISERROR

Practice tasks (10)

  1. Task 1. TYPE number.
    1.
  2. Task 2. TYPE text.
    2.
  3. Task 3. TYPE logical.
    4.
  4. Task 4. TYPE NA.
    16.
  5. Task 5. IFS label.
    Map.
  6. Task 6. Interview.
    Talk.
  7. Task 7. Teach.
    Teach.
  8. Task 8. Card codes.
    Memorise.
  9. Task 9. Fill.
    Fill.
  10. Task 10. Tease IS*.
    Related.

Quick quiz

Q1. TYPE(10)?
Q2. TYPE("Asha")?
Q3. TYPE(TRUE)?
Q4. TYPE(NA())?
Q5. Array code?

Answers: Q1=1, Q2=2, Q3=4, Q4=16, Q5=64 (check after you try).

Revision card

Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.

Revision card: TYPE
TYPE revision card