ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Forcing users to enter value based on criteria (https://www.excelbanter.com/excel-discussion-misc-queries/124986-forcing-users-enter-value-based-criteria.html)

Adi

Forcing users to enter value based on criteria
 
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

Max

Forcing users to enter value based on criteria
 
Perhaps in say, D5:
=IF(B5="","","Select value from C5")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"adi" wrote in message
...
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




Gary''s Student

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



All times are GMT +1. The time now is 11:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com