#1   Report Post  
Ken Stratford
 
Posts: n/a
Default prevent blank cell

How do I prevent users of my workbook from making a cell blank? I want them
to be able to edit it so have left it unprotected but I donot want them to
be able to leave it blank. It looks as if the Data Validation command should
do it, but I can't get it to work.
  #2   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

Your repeat post appears as a reply to the thread in my browser. As a
result, I almost didn't read your post on the assumption that your
question had already been answered. I suspect many others did ignore
your post for the same reason.

Assuming that you know how to set up the validation condition (uncheck
"Ignore blank", set up a "Custom" validation, such as =ISNUMBER(A1)
where A1 is the cell to validate, etc.) then I presume that you are
hitting a known weakness of Data Validation, where deleting data from
the cell (without replacing with anything new) leaves the cell empty, so
the Data Validation event does not fire (presumably the faulty logic was
that there is no data to validate ...). You can roll your own patch in
VBA along the lines of
http://groups-beta.google.com/group/...945c7bccd60819

Jerry

Ken Stratford wrote:

How do I prevent users of my workbook from making a cell blank? I want them
to be able to edit it so have left it unprotected but I donot want them to
be able to leave it blank. It looks as if the Data Validation command should
do it, but I can't get it to work.


  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

I like to use an adjacent column and put a formula like:

=if(trim(a1)<"","","<-- Don't leave blank")

I bold it in big red letters.



Ken Stratford wrote:

How do I prevent users of my workbook from making a cell blank? I want them
to be able to edit it so have left it unprotected but I donot want them to
be able to leave it blank. It looks as if the Data Validation command should
do it, but I can't get it to work.


--

Dave Peterson
  #4   Report Post  
Ken Stratford
 
Posts: n/a
Default



"Jerry W. Lewis" wrote:

Your repeat post appears as a reply to the thread in my browser. As a
result, I almost didn't read your post on the assumption that your
question had already been answered. I suspect many others did ignore
your post for the same reason.

Assuming that you know how to set up the validation condition (uncheck
"Ignore blank", set up a "Custom" validation, such as =ISNUMBER(A1)
where A1 is the cell to validate, etc.) then I presume that you are
hitting a known weakness of Data Validation, where deleting data from
the cell (without replacing with anything new) leaves the cell empty, so
the Data Validation event does not fire (presumably the faulty logic was
that there is no data to validate ...). You can roll your own patch in
VBA along the lines of
http://groups-beta.google.com/group/...945c7bccd60819

Jerry

Ken Stratford wrote:

How do I prevent users of my workbook from making a cell blank? I want them
to be able to edit it so have left it unprotected but I donot want them to
be able to leave it blank. It looks as if the Data Validation command should
do it, but I can't get it to work.


Thanks - a good solution - I knew there had to be a way! Ken

  #5   Report Post  
Ken Stratford
 
Posts: n/a
Default



"Dave Peterson" wrote:

I like to use an adjacent column and put a formula like:

=if(trim(a1)<"","","<-- Don't leave blank")

I bold it in big red letters.



Ken Stratford wrote:

How do I prevent users of my workbook from making a cell blank? I want them
to be able to edit it so have left it unprotected but I donot want them to
be able to leave it blank. It looks as if the Data Validation command should
do it, but I can't get it to work.


--

Dave Peterson
Thanks Dave - that's a useful way round it..

Ken


  #6   Report Post  
Jerry W. Lewis
 
Posts: n/a
Default

Ken Stratford wrote:
....

Thanks - a good solution - I knew there had to be a way! Ken



You're welcome, glad it helped.

Jerry

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Look for change next blank cell in Range Nigel Bennett Excel Worksheet Functions 1 March 13th 05 09:45 PM
Go to first blank cell Curt D. Excel Worksheet Functions 4 February 28th 05 10:27 AM
Ghost Blank Cell References David P Excel Worksheet Functions 1 February 4th 05 03:27 AM
How would I fill blank cells with the data from a previous cell? Clive Darling Excel Discussion (Misc queries) 3 January 6th 05 01:10 AM
Help with formula to make cell blank Inspector Excel Worksheet Functions 5 November 18th 04 08:15 PM


All times are GMT +1. The time now is 05:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"