Introduction
Excel often needs to convert numbers into formatted text, text into numbers, compare text values, and work with character codes. The TEXT function formats numbers and dates as text, VALUE converts numeric text into numbers, EXACT checks whether two text values are exactly the same, CHAR returns a character from a code, and CODE returns the code of the first character in a text value. TEXT, VALUE, EXACT, CHAR and CODE Excel practice questions with solutions to help you understand the concepts.
Question 1: Format Numbers as Currency Using TEXT
Problem Statement
Sales amounts are stored as numbers. Display them with a rupee symbol and two decimal places.
Excel Data
| Employee | Sales | Formatted Sales |
|---|---|---|
| Rahul | 25000 | |
| Priya | 37500.5 | |
| Amit | 48250.75 | |
| Neha | 12500 | |
| Arjun | 56320.25 |
Solution
In C2, enter:
=TEXT(B2,"₹#,##0.00")
Copy the formula down.
Expected Output
| Employee | Sales | Formatted Sales |
|---|---|---|
| Rahul | 25000 | ₹25,000.00 |
| Priya | 37500.5 | ₹37,500.50 |
| Amit | 48250.75 | ₹48,250.75 |
| Neha | 12500 | ₹12,500.00 |
| Arjun | 56320.25 | ₹56,320.25 |
Note: TEXT returns the formatted result as text, not as a numeric value.
Question 2: Format Dates Using TEXT
Problem Statement
Dates are stored in Excel’s normal date format. Display them in the format:
15 September 2026
Excel Data
| Employee | Joining Date | Formatted Date |
|---|---|---|
| Rahul | 15/01/2026 | |
| Priya | 22/02/2026 | |
| Amit | 10/03/2026 | |
| Neha | 05/04/2026 | |
| Arjun | 18/05/2026 |
Solution
In C2, enter:
=TEXT(B2,"dd mmmm yyyy")
Copy down.
Expected Output
| Employee | Joining Date | Formatted Date |
|---|---|---|
| Rahul | 15/01/2026 | 15 January 2026 |
| Priya | 22/02/2026 | 22 February 2026 |
| Amit | 10/03/2026 | 10 March 2026 |
| Neha | 05/04/2026 | 05 April 2026 |
| Arjun | 18/05/2026 | 18 May 2026 |
Question 3: Convert Text Numbers into Numbers Using VALUE
Problem Statement
Sales figures have been imported as text. Convert them into actual numbers so they can be used in calculations.
Excel Data
| Product | Sales as Text | Numeric Sales |
|---|---|---|
| Laptop | "25000" | |
| Monitor | "18500" | |
| Keyboard | "4500" | |
| Mouse | "1200" | |
| Printer | "15000" |
Solution
In C2, enter:
=VALUE(B2)
Copy down.
Expected Output
| Product | Sales as Text | Numeric Sales |
|---|---|---|
| Laptop | "25000" | 25000 |
| Monitor | "18500" | 18500 |
| Keyboard | "4500" | 4500 |
| Mouse | "1200" | 1200 |
| Printer | "15000" | 15000 |
After conversion, the results can be used normally in mathematical calculations.
Question 4: Compare Two Text Values Using EXACT
Problem Statement
Check whether the two product codes are exactly identical, including capitalization.
Excel Data
| Code 1 | Code 2 | Match |
|---|---|---|
| ABC101 | ABC101 | |
| ABC102 | abc102 | |
| PROD103 | PROD103 | |
| LAP104 | LAP104 | |
| MON105 | mon105 |
Solution
In C2, enter:
=EXACT(A2,B2)
Copy down.
Expected Output
| Code 1 | Code 2 | Match |
|---|---|---|
| ABC101 | ABC101 | TRUE |
| ABC102 | abc102 | FALSE |
| PROD103 | PROD103 | TRUE |
| LAP104 | LAP104 | TRUE |
| MON105 | mon105 | FALSE |
EXACT is case-sensitive.
Question 5: Generate Characters Using CHAR
Problem Statement
Use CHAR to generate common special characters.
Create:
ABCDE
using their character codes.
Excel Data
| Code | Character |
|---|---|
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 |
Solution
In B2, enter:
=CHAR(A2)
Copy down.
Expected Output
| Code | Character |
|---|---|
| 65 | A |
| 66 | B |
| 67 | C |
| 68 | D |
| 69 | E |
CHAR converts a numeric character code into its corresponding character.
Question 6: Find the Character Code Using CODE
Problem Statement
Find the character code of the first character in each product code.
Excel Data
| Product Code | First Character Code |
|---|---|
| ABC101 | |
| XYZ202 | |
| PQR303 | |
| LAP404 | |
| MON505 |
Solution
In B2, enter:
=CODE(A2)
Copy down.
Expected Output
| Product Code | First Character Code |
|---|---|
| ABC101 | 65 |
| XYZ202 | 88 |
| PQR303 | 80 |
| LAP404 | 76 |
| MON505 | 77 |
CODE returns the numeric code of the first character in the supplied text.
Question 7: Create a Formatted Invoice Number Using TEXT
Problem Statement
Invoice numbers are stored as ordinary numbers. Display them in this format:
INV-00001
Excel Data
| Invoice Number | Formatted Invoice |
|---|---|
| 1 | |
| 25 | |
| 105 | |
| 1250 | |
| 9876 |
Solution
In B2, enter:
="INV-"&TEXT(A2,"00000")
Copy down.
Expected Output
| Invoice Number | Formatted Invoice |
|---|---|
| 1 | INV-00001 |
| 25 | INV-00025 |
| 105 | INV-00105 |
| 1250 | INV-01250 |
| 9876 | INV-09876 |
Here, TEXT adds leading zeros to create a consistent invoice format.
Question 8: Compare Customer Names Exactly
Problem Statement
A company has two customer lists. Check whether the names match exactly, including capitalization.
Excel Data
| List 1 | List 2 | Exact Match |
|---|---|---|
| Rahul Sharma | Rahul Sharma | |
| Priya Verma | priya verma | |
| Amit Kumar | Amit Kumar | |
| Neha Kapoor | Neha Kapoor | |
| Arjun Singh | Arjun singh |
Solution
In C2, enter:
=EXACT(A2,B2)
Copy down.
Expected Output
| List 1 | List 2 | Exact Match |
|---|---|---|
| Rahul Sharma | Rahul Sharma | TRUE |
| Priya Verma | priya verma | FALSE |
| Amit Kumar | Amit Kumar | TRUE |
| Neha Kapoor | Neha Kapoor | TRUE |
| Arjun Singh | Arjun singh | FALSE |
This is different from a normal = comparison because EXACT checks capitalization.
Question 9: Convert Imported Numeric Text and Calculate Total
Problem Statement
Product prices and quantities have been imported as text. Convert them to numbers and calculate the total value.
Excel Data
| Product | Price | Quantity | Total |
|---|---|---|---|
| Laptop | "45000" | "2" | |
| Monitor | "18000" | "3" | |
| Keyboard | "2500" | "5" | |
| Mouse | "800" | "10" | |
| Printer | "12000" | "2" |
Solution
In D2, enter:
=VALUE(B2)*VALUE(C2)
Copy down.
Expected Output
| Product | Price | Quantity | Total |
|---|---|---|---|
| Laptop | "45000" | "2" | 90000 |
| Monitor | "18000" | "3" | 54000 |
| Keyboard | "2500" | "5" | 12500 |
| Mouse | "800" | "10" | 8000 |
| Printer | "12000" | "2" | 24000 |
VALUE converts the text values into numbers before multiplication.
Question 10: Create a Formatted Employee Code Using TEXT, CHAR and CODE
Problem Statement
Create a new employee code using:
- First letter of the employee’s name
- Employee number with three digits
- Department code
For example:
R-101-IT
Excel Data
| Employee | Employee No. | Department | Employee Code |
|---|---|---|---|
| Rahul | 1 | IT | |
| Priya | 25 | HR | |
| Amit | 105 | Sales | |
| Neha | 8 | Finance | |
| Arjun | 42 | IT |
Solution
In D2, enter:
=CHAR(CODE(LEFT(A2,1)))&"-"&TEXT(B2,"000")&"-"&C2
Copy down.
Expected Output
| Employee | Employee No. | Department | Employee Code |
|---|---|---|---|
| Rahul | 1 | IT | R-001-IT |
| Priya | 25 | HR | P-025-HR |
| Amit | 105 | Sales | A-105-Sales |
| Neha | 8 | Finance | N-008-Finance |
| Arjun | 42 | IT | A-042-IT |
Here:
LEFTgets the first character.CODEgets its character code.CHARconverts that code back to a character.TEXTformats the employee number with leading zeros.
Key Takeaways
TEXTconverts a number or date into formatted text.VALUEconverts numeric text into an actual number.EXACTcompares two text values and is case-sensitive.CHARin excel converts a character code into a character.CODEreturns the code of the first character in a text value.TEXTin excel is useful for creating formatted dates, currency values, invoice numbers, and IDs.VALUEis useful when numbers have been imported or stored as text.EXACTis useful when capitalization matters during text comparison.CHARandCODEcan be used to work with character codes.TEXTreturns text, so its result should not be used directly for mathematical calculations unless it is converted back to a number.- These functions become more powerful when combined with functions such as
LEFT,CONCAT,IF, and other text functions.
FAQs
1. What does the TEXT function do in Excel?
TEXT converts a numeric value or date into text using a specified format.
For example:
=TEXT(A2,"₹#,##0.00")
2. Does TEXT change a number into text?
Yes. The result returned by TEXT is text, even if the original value was a number.
3. What does VALUE do in Excel?
VALUE converts text that represents a number into an actual numeric value.
=VALUE(A2)
4. What is the difference between TEXT and VALUE?
TEXT generally converts a number into formatted text, while VALUE converts numeric text back into a number.
For example:
=TEXT(25000,"₹#,##0")
returns formatted text, while:
=VALUE("25000")
returns a number.
5. Is EXACT case-sensitive?
Yes. EXACT considers uppercase and lowercase letters different.
=EXACT("Excel","excel")
returns FALSE.
6. What does CHAR do in Excel?
CHAR converts a numeric character code into its corresponding character.
=CHAR(65)
returns A.
7. What does CODE do in Excel?
CODE returns the numeric code of the first character in a text string.
=CODE("Apple")
returns the code for A.
8. Can TEXT be used to add leading zeros?
Yes. For example:
=TEXT(A2,"00000")
can turn 25 into 00025.
9. Can VALUE be used in calculations?
Yes. This is one of its main uses when numbers are stored as text.
=VALUE(A2)*VALUE(B2)
10. Why are TEXT, VALUE, EXACT, CHAR and CODE useful in Excel?
They help with formatting, data conversion, text comparison, character handling, and cleaning or standardizing imported data. These functions are especially useful when working with IDs, invoices, dates, numeric text, and structured datasets.
Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.
