0
0
Excelspreadsheet~20 mins

LEN function in Excel - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
LEN Function Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
Calculate length of trimmed text
Given cell A1 contains the text " Hello World ", which formula correctly returns the length of the text without leading and trailing spaces?
A=LEN(TRIM(A1))
B=LEN(A1)
C=LEN(SUBSTITUTE(A1," ",""))
D=LEN(A1)-2
Attempts:
2 left
💡 Hint

Think about how to remove spaces before counting characters.

📊 Formula Result
intermediate
1:30remaining
Counting characters including spaces
If cell B2 contains the text "Data Science", what does the formula =LEN(B2) return?
A11
B10
C12
D9
Attempts:
2 left
💡 Hint

Count all letters and spaces in the text.

Function Choice
advanced
2:00remaining
Choose formula to count characters excluding spaces
Which formula correctly counts the number of characters in cell C3 excluding all spaces?
A=LEN(SUBSTITUTE(C3," ",""))
B=LEN(C3)-LEN(SUBSTITUTE(C3," ",""))
C=LEN(C3)+LEN(SUBSTITUTE(C3," ",""))
D=SUBSTITUTE(LEN(C3)," ","")
Attempts:
2 left
💡 Hint

Think about removing spaces first, then counting characters.

📊 Formula Result
advanced
1:30remaining
Length of a formula-generated string
Cell D4 contains the formula =CONCATENATE("Hi", " ", "There"). What does =LEN(D4) return?
A7
B8
C6
D5
Attempts:
2 left
💡 Hint

Count all letters and spaces in the combined text.

🎯 Scenario
expert
2:30remaining
Find the number of characters in a cell ignoring trailing spaces only
You want to count the number of characters in cell E5 but ignore only trailing spaces (spaces at the end). Which formula will give the correct count?
A=LEN(E5)-LEN(RIGHT(E5,LEN(E5)-LEN(RTRIM(E5))))
B=LEN(E5)-LEN(LEFT(E5,LEN(E5)-LEN(RTRIM(E5))))
C=LEN(E5)-LEN(TRIM(E5))
D=LEN(RTRIM(E5))
Attempts:
2 left
💡 Hint

Use a function that removes spaces only from the right side.