Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default How to make a cell required if another cell has text in it

I have a group of users in a list. If they book a TV (by choosing their name
under the equipment), I want to force them to add what movie they are
planning to show in the cell below their name before they can book the TV.

I am a newbie at this and a little confused with the variety of macros.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,058
Default How to make a cell required if another cell has text in it

In A1 put:
TV
In A2 put the validation list dropdown
In A3 the users should enter the name of the movie

In worksheet code enter:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A2")) Is Nothing Then Exit Sub
If Target.Offset(1, 0) = "" Then
Application.EnableEvents = False
Target.Value = ""
Application.EnableEvents = True
MsgBox ("Movie title must be entered first")
End If
End Sub

If the user attempts to enter their name in A2 prior to entering the moving
title in A3, the action will be rejected.
--
Gary''s Student - gsnu200731
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default How to make a cell required if another cell has text in it

It worked perfectly! Thank you so much.

"Gary''s Student" wrote:

In A1 put:
TV
In A2 put the validation list dropdown
In A3 the users should enter the name of the movie

In worksheet code enter:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A2")) Is Nothing Then Exit Sub
If Target.Offset(1, 0) = "" Then
Application.EnableEvents = False
Target.Value = ""
Application.EnableEvents = True
MsgBox ("Movie title must be entered first")
End If
End Sub

If the user attempts to enter their name in A2 prior to entering the moving
title in A3, the action will be rejected.
--
Gary''s Student - gsnu200731

  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3
Default How to make a cell required if another cell has text in it

This works great for one cell - thanks. But, there are 6 T.V. and 8 periods
that I need to use the same code for. Different teachers will be adding their
names to the list as the day goes on. It there anyway to make this work each
time the list is activated for the different periods and TVs?

I tried adding the other cells to the range, and it works, but if the
information is provided in an earlier cell, the formula figures it is done
and doesn't work on any of the other ones.

"Gary''s Student" wrote:

In A1 put:
TV
In A2 put the validation list dropdown
In A3 the users should enter the name of the movie

In worksheet code enter:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A2")) Is Nothing Then Exit Sub
If Target.Offset(1, 0) = "" Then
Application.EnableEvents = False
Target.Value = ""
Application.EnableEvents = True
MsgBox ("Movie title must be entered first")
End If
End Sub

If the user attempts to enter their name in A2 prior to entering the moving
title in A3, the action will be rejected.
--
Gary''s Student - gsnu200731

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
is it possible to make a cell in excel as entry required max power Excel Discussion (Misc queries) 1 November 8th 06 01:27 PM
can you make a cell value required? nishapurohit Excel Discussion (Misc queries) 2 January 30th 06 11:42 PM
how to make a cell required in excel ncaurora03 Excel Discussion (Misc queries) 1 January 30th 06 06:11 PM
How do I make a cell required to edit in Excell? Belinda Excel Discussion (Misc queries) 1 November 4th 05 04:43 PM
how do I make a cell in Excel required to be populated? Tia Excel Discussion (Misc queries) 1 February 10th 05 12:35 AM


All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"