View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Forcing users to enter value based on criteria

Put this macro in worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B5")) Is Nothing Then
Exit Sub
End If
Do While Range("C5").Value = False
Range("C5").Value = Application.InputBox("Enter C5 Value:")
Loop
End Sub

Once the user has entered data in B5, they are prompted to enter a value for
C5.


REMEMBER worksheet code, not a standard module

if you are not familiar with VBA, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm
--
Gary's Student


"adi" wrote:

Hi Everyone and Happy New Year,

I have created a simple worksheet so users can record the time they spend on
certain task. However I need help with the following:

If B5 is not blank then the user should be prompted to select a value from C5.

What formula/function should I use to make this work?

Many thanks,

Andy