Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
try this pasted on the sheet code page and see if it works for you. i used
a4 in this example Private Sub Worksheet_SelectionChange(ByVal Target As Range) Set rng = Range("a4") If rng.Value = "" Then MsgBox " You must enter a number" rng.Select End If If rng.Value < 0 Or rng.Value 60 Then MsgBox " you must enter a number between 0 and 60" rng.Select End If End Sub -- Gary "Maggie" wrote in message ... I tried using Data, Validation for this, but couldn't get it to work. I need to check a cell to ensure the value entered is between 0 and 60, but I also need to prevent the user from leaving the cell blank. -- Thank you, Maggie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
skipping empty cells that are not empty | Excel Programming | |||
Excel - Autom. Filter "Empty / Non Empty cells" should come first | Excel Discussion (Misc queries) | |||
How can I convert empty strings to empty cells? | Excel Discussion (Misc queries) | |||
macro to colour empty cells (cells not recognized as empty) | Excel Programming | |||
Can blank cells created using empty Double-Quotes not be empty?? | Excel Programming |