HomeTestsSearchRankProfile
mediumMCQCUET 2025 31 May Shift 12026CUET Accountancy
1 mark

Which formula can be used to prevent leading or trailing spaces in a data validation rule?

  1. A
    \text{=TRIM(A1)=A1}
  2. B
    \text{=LEN(A1)>10}
  3. C
    \text{=ISNUMBER(A1)}
  4. D
    \text{=WEEKDAY(A1)<>1}

Solution & Step-by-step Explanation

The TRIM function automatically strips away all leading and trailing whitespaces from a string. By setting a custom data validation rule to check if =TRIM(A1)=A1, Excel ensures that the user's raw input matches the trimmed version. If there are leading or trailing spaces, the logical condition returns FALSE, triggering an error and blocking invalid data entry.

Practice this question

Try it yourself before checking the explanation above.

Which formula can be used to prevent leading or trailing spaces in a data validation rule?
A
\text{=TRIM(A1)=A1}
B
\text{=LEN(A1)>10}
C
\text{=ISNUMBER(A1)}
D
\text{=WEEKDAY(A1)<>1}

Share This Question

Related Questions

Ready for a Full Test?

Practice with timed mock tests and track your performance across CUET Accountancy.

Discussion