![]() |
force entry in cell "B" if entry made in cell "A"
I'd like to force (or at least encourage) entry in a cell in column B if the
user enters data in the same row cell of column A. For instance, if they input "Add class" in cell A1, they must input data in B1. |
force entry in cell "B" if entry made in cell "A"
Donna,
Right click your sheet tab, view code and paste the code below in. If the user enters the string Add Class in any cell in column A they get a message Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub If Not Intersect(Target, Range("A:A")) Is Nothing Then Application.EnableEvents = False If UCase(Target.Value) = "ADD CLASS" Then Target.Offset(, 1).Select MsgBox "Please enter data into B" & Target.Row Application.EnableEvents = True End If End If End Sub Mike "Donna" wrote: I'd like to force (or at least encourage) entry in a cell in column B if the user enters data in the same row cell of column A. For instance, if they input "Add class" in cell A1, they must input data in B1. |
All times are GMT +1. The time now is 07:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com