View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Checking Blank Rows

right click on the sheet tab and select view code. then paste in code like
this:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Not Intersect(Target, Range("A2:A50")) Is Nothing Then
If IsEmpty(Target.Offset(-1, 0)) Then
Target.Offset(-1, 0).Select
End If
End If
End Sub

--
Regards,
Tom Ogilvy


"AccessHelp" wrote in message
...
I have a range (A1:A50) where users type in the information. In the range
users not suppose to skip a cell(s) and type in the information in the

cell
after. For example, I type in the info in Cell A1. Then I skip Cell A2

and
type in the info in Cell A3. In this example I am not supposed to skip A2
and type in the info in A3.

Can we write a code to check and prompt the users not to skip the cell(s)?
Please consider sometimes the users may skip more than one cell, and I

only
want to check and prompt the users for the skip cells. The users may or

may
not type in the info in all A1:A50. Therefore, the checking should stop

on
the last cell of info entered.

Please help. Thanks.

Happy New Year to you all!!!