Which formula can be used to prevent leading or trailing spaces in a data validation rule? |
=TRIM(A1)=A1 =LEN(A1)>10 =ISNUMBER(A1) =WEEKDAY(A1)<>1 |
=TRIM(A1)=A1 |
The correct answer is option 1- =TRIM(A1)=A1. This formula checks if the value in cell A1 has no leading or trailing spaces. TRIM(A1) removes all leading and trailing spaces (and extra spaces between words). If the result of TRIM(A1) equals the original, it means there were no extra spaces to begin with. So, for data validation, using =TRIM(A1)=A1 will allow only entries without leading or trailing spaces. |