Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Larry
 
Posts: n/a
Default validation formulas

can I create a validation formula that will allow either a preset value or a
user defined value depending upon the value of another cell
  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

Need more detail. Some examples would be nice.

Biff

-----Original Message-----
can I create a validation formula that will allow either

a preset value or a
user defined value depending upon the value of another

cell
.

  #3   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You could use custom data validation. For example:

Select cell C6
Choose DataValidation
From the Allow dropdown, choose Custom
In the Formula box, type:

=IF(B6="Yes",OR(C6="",C6<""),C6<5)

Click OK

If cell B6 contains the word Yes, you can type anything in cell C6.
If cell B6 contains any other value, you can enter a number less than 5
in cell C6.

Larry wrote:
can I create a validation formula that will allow either a preset value or a
user defined value depending upon the value of another cell



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #4   Report Post  
Larry
 
Posts: n/a
Default

cell c9 has a drop down list "STAT, 6:45, 7:00. 7:15 etc"
if c9 = "STAT" I want c17 to equal "8"
if c9 does not equal "STAT" I want the value of c17 to be user input.
Is this possible?
Conditional validation formulas only allow the proper value without
inputting anything.
conditional formulas are erased if you have a user input in that cell.


"Larry" wrote:

can I create a validation formula that will allow either a preset value or a
user defined value depending upon the value of another cell

  #5   Report Post  
JulieD
 
Posts: n/a
Default

Hi Larry

a cell can not allow for both the keeping of a formula and user entry .. the
only way to do this is to use worksheet_change code, here's two examples to
give you an idea:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$C$9" And Target.Value < "" Then
If UCase(Target.Value) = "STAT" Then
Range("C17").Value = 8
Else
Range("C17").Value = InputBox("Enter a value for C17")
End If
End If
End Sub

OR

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$C$9" And Target.Value < "" Then
If UCase(Target.Value) = "STAT" Then
Range("C17").Value = 8
Else
Range("C17").Value = Null
End If
End If
End Sub


----
to use this code, right mouse click on the sheet tab of the sheet containing
the list in C9 and choose view code
copy & paste this code directly into the right hand side of the screen
use ALT & F11 to switch back to your workbook and test
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Larry" wrote in message
...
cell c9 has a drop down list "STAT, 6:45, 7:00. 7:15 etc"
if c9 = "STAT" I want c17 to equal "8"
if c9 does not equal "STAT" I want the value of c17 to be user input.
Is this possible?
Conditional validation formulas only allow the proper value without
inputting anything.
conditional formulas are erased if you have a user input in that cell.


"Larry" wrote:

can I create a validation formula that will allow either a preset value
or a
user defined value depending upon the value of another cell





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
Problem with named formula's nathan Excel Worksheet Functions 0 January 21st 05 04:07 PM
How to make Excel run limited number of formulas on a given worksh John Excel Discussion (Misc queries) 0 January 12th 05 04:29 PM
Data Validation Window? Ken Excel Discussion (Misc queries) 1 January 11th 05 10:48 PM
calculating formulas for all workbooks in a folder Chad Excel Worksheet Functions 3 November 13th 04 05:22 PM
formulas for transferring data validation information in excel 200 Tony Excel Worksheet Functions 1 November 9th 04 10:21 PM


All times are GMT +1. The time now is 09:51 PM.

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

About Us

"It's about Microsoft Excel"