User must enter something in a range of cells

G

Guest

A student asked this question recently and I couldn't figure it out.
We were doing data validation and they asked if there is a way to require
that a cell have information entered in it and it can't be left blank.
I tried several options but couldn't get it to work.
Any suggestions using data validation and/or any other Excel features?
Thanks for any suggestions!
Jugglertwo
 
B

Bob Phillips

Data Validation wouldn't really work, as it is only really triggered by
entering data. It could be made to work if the user cleared it out, but if
they just left it blank, it never gets invoked.

The best way would be to use the workbook_BeforeClose event to test the cell
and cancel the close if blank.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
H

Harald Staff

Hi Jugglertwo

There is no way to require anything with a computer unless you have power
over the user. "If this isn't filled out by noon then you're fired" works
well. "I found some interesting image files in your Temporary Internet Files
folder, shall I forward them ?" is a thing I think software can do to
threaten workers.

For ordinary spreadsheets you can ensure that this sort and that subtotal
doesn't happen unless this cell entry and that dropdown is in place. But
that's rarely a threat. Annoy the user sufficiently, it takes far less time
than we think, and she'll Ctrl Alt Delete her way out of Excel and your
application has been ran for the last time. Answer is definitely no.

HTH. Best wishes Harald
 
D

Dave Peterson

I've found just putting up a warning in an adjacent cell is enough of a reminder
for most people.

=if(a1<>"","","<-- Please fill in this cell!")
 
G

Guest

Thanks to all three of you for responding to my question.
I now know how to answer the student's question and apply this information
in the future.
Thanks again!
Jugglertwo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top