Don't allow a space in a cell...how to prevent?
There may be a fancier way of doing it but one option is to
a) Fine a spare area in the spreadsheet and type a list of values you would
be happy for users to enter(e.g. Student missed class, Student Attended
class).
b) Highlight the range of cells that the values would normally be typed into
c) Select Data, Validation, Allow - select List from the drop down box, then
in the Source box highlight the list you created in a) above.
Hope this helps
Bernard
"Jugglertwo" wrote:
One of my students asked an interesting question yesterday in Excel.
We were working on IF statements and if a cell had a student's name in it,
the IF statement proceeded to do the FALSE Result, if not, it did the TRUE
Result.
=if(A1="","student missed class","student attended class")
I explained that if a student hit the space bar and entered "a space", this
space would be considered something and the IF statement would produce the
FALSE Result of "student attended class".
Student's question (and mine): Is there a way to prevent someone from
entering "a space" in the cell? Even though it looks blank, the space will be
there causing the IF statement to produced "the wrong" result. Hope this
makes sense.
Any suggestions would be greatly appreciated!
Thanks!
Jugglertwo
|