Data Validation

  • Thread starter Thread starter LaDdIe
  • Start date Start date
L

LaDdIe

Hi,

I'm trying to apply data validation to a range of cells, the rules are that
the user must enter a numeric value >0, or enter 0, the cell can't just be
left blank.

Any help is welcome.
 
I don't think Data Validation is going to do that. What is the driver that
is going to force the user to do anything? In other words, what do you want
to happen if the user doesn't follow your rules?
An example of what can happen: If the user doesn't follow the rules, and
attempts to close or save the file, a message box will pop up saying
whatever you want it to, and the file will nor close or save. The driver,
in this instance, is that he can't close or save the file if he doesn't
follow your rules. So the question is back to you; what do you want to
happen if the user doesn't follow your rules? HTH Otto
 
LaDdIe said:
Hi,

I'm trying to apply data validation to a range of cells, the rules are that
the user must enter a numeric value >0, or enter 0, the cell can't just be
left blank.

Any help is welcome.

You can set validation to whole number and a specific range, but you
cannot prevent the user pressing return on an empty cell. You would have
to move the test for ISNUMBER() into whatever the next stage is.

NB A blank cell looks to some Excel numeric functions like zero.

Regards,
Martin Brown
 
Thanks Otto,

I guessed as much, I decided to go the VBA route and knocked up some code
that bounce back to the previous cell if that cell was left blank.
 
Thanks Martin

Martin Brown said:
You can set validation to whole number and a specific range, but you
cannot prevent the user pressing return on an empty cell. You would have
to move the test for ISNUMBER() into whatever the next stage is.

NB A blank cell looks to some Excel numeric functions like zero.

Regards,
Martin Brown
.
 
Back
Top