Empty cell warning

J

JT

The macro below is more or less what I'm looking for except I don't want a range but I would like to list specific cells instead. Since I don't know how to write macros I'm hoping someone can modify this macro so I can simply edit it by adding the cell(s) in question, for example: b1, c7, g12 etc.

thanks for any assistance



Option Explicit
Private Sub Worksheet_SelectionChange(ByVal target As Range)

Application.EnableEvents = False

If Not Intersect(target, Range("A:AC")) Is Nothing Then
If target.Offset(0, -1).Value = "" Then
MsgBox "Please enter a value before continuing."
target.Offset(0, -1).Select
End If
End If

Application.EnableEvents = True

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top