Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Preventing cell from being empty

Hi all
I have a few sheets in my workbook. On each sheet are a few cells that are
essential for calculations. I have managed to specify the range that the
values may have in these cells. But I want to check that the cell is not
empty when the cell loses focus. Is there a way of doing this with VBA (or
with the Excel functionality itself)?
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Preventing cell from being empty

Hi

Select the cell(s), go Menu Data Validation. Choose the desired data type
in the Allow box (like Decimal between this and that value). Uncheck "ignore
blank". Finally customize the input and error message on the next panes.

HTH. Best wishes Harald

"Kobus" skrev i melding
...
Hi all
I have a few sheets in my workbook. On each sheet are a few cells that are
essential for calculations. I have managed to specify the range that the
values may have in these cells. But I want to check that the cell is not
empty when the cell loses focus. Is there a way of doing this with VBA (or
with the Excel functionality itself)?
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Preventing cell from being empty


you can use the sheet's CHANGE event. This is fired whenever an entry is
made. if the cell is empty, put a defaul into it

eg. I have a named range on another sheet called "defaultList" ...just two
cells for the example

You'll need a key in say the cell to the left of your entry cells so that
you can get the default from the default table looking up the key.









"Kobus" wrote:

Hi all
I have a few sheets in my workbook. On each sheet are a few cells that are
essential for calculations. I have managed to specify the range that the
values may have in these cells. But I want to check that the cell is not
empty when the cell loses focus. Is there a way of doing this with VBA (or
with the Excel functionality itself)?
Thanks

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
Preventing Multi Cell Selection Michael Excel Dude Excel Discussion (Misc queries) 2 September 5th 06 02:18 PM
preventing cell contents from being entered twice? AndyWes Excel Discussion (Misc queries) 2 May 11th 06 11:57 PM
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
preventing a cell from being referenced? Eijah626 Excel Discussion (Misc queries) 1 November 28th 05 07:23 PM
Preventing cell contents from printing Blair Scanlan Excel Discussion (Misc queries) 5 December 20th 04 12:39 AM


All times are GMT +1. The time now is 05:57 AM.

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

About Us

"It's about Microsoft Excel"