ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Require cell entry (https://www.excelbanter.com/excel-programming/302417-re-require-cell-entry.html)

Bernie Deitrick

Require cell entry
 
You could use the change event. As long as there is something in row 4740
(in another column, even) then the event code below may help. Copy the
code, right click on the sheet tab and select "View Code" and paste the code
in the window that appears.

HTH,
Bernie
MS Excel MVP

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim myRange As Range
Dim myCells As Range

On Error Resume Next
Set myRange = Range("G5:H4740")
If Intersect(Target, myRange) Is Nothing Then Exit Sub
If Target.Row = myRange(1).Row Then Exit Sub

Set myCells = myRange.Resize(Target.Row - myRange(1).Row, 2)
If Application.WorksheetFunction.CountBlank(myCells) 0 Then
MsgBox "Hey, you left blanks in " & _
myCells.SpecialCells(xlCellTypeBlanks).Address
End If
End Sub


"kmcgee" wrote in message
...
I have set data validation to require either a 0 or 1 be entered in the

range 'g5:h4740'. Is there anyway to require the data be entered and not
allow someone to tab through?




All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com