Entering information
Having dinner and Hockey Game...........Go Pens!
Probably tomorrow after early morning round of golf before I can get back to
this.
Maybe Patrick is free before then<g
Gord
On Tue, 2 Jun 2009 16:40:02 -0700, Link
wrote:
Hi sorry to be a bother; suppose I have three ranges example c2:n4 this is
the first with this other set them F:8:O8 and f11:O11. I need to fill f8
them F11 after G8 then G11 then H8 then H11 etc. ( I want the colum in order)
"Gord Dibben" wrote:
Patrick's code points only to A1 and A2, not "all cells"
Which cells would you like to see included?
Try editing this to suit or post back with some specifics.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim Cell As Range
Const WS_RANGE As String = "A2:F2"
Application.EnableEvents = False
On Error Resume Next
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
For Each Cell In Intersect(Target, Me.Range(WS_RANGE)).Cells
With Cell.Offset(-1, 0)
If .Value = "" Then
MsgBox .Address & " is empty"
End If
End With
Next
End If
On Error GoTo 0
Application.EnableEvents = True
End Sub
Gord
On Tue, 2 Jun 2009 15:35:01 -0700, Link
wrote:
This is what I need the information to apply only certain cells; not every
cells. Is this possible?
"Gord Dibben" wrote:
You don't type anything.
Copy from Patrick's post and paste into the blank white space of the module
that opens when you right-click and "View Code".
Gord Dibben MS Excel MVP
On Tue, 2 Jun 2009 14:55:15 -0700, Link
wrote:
I am confused. After I click on view code where do I type all this information?
"Patrick Molloy" wrote:
use the sheet's change method ....right click the sheet tab and select View
Code from the pop-up menu
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a2").Address Then
If Range("a1") = "" Then
MsgBox "A1 is empty"
Application.EnableEvents = False
Target.Value = ""
Application.EnableEvents = True
End If
End If
End Sub
"Link" wrote in message
...
In a worksheet where you have to fill in information what formula to use
if
you want to make sure (example cell A1 is filled in before A2) In other
words
they if A1 is not filled in you cant move to A2.
|