Related:
- Excel data validation if statement
- Fenix internet on bank statement - Guide
- Display two columns in data validation list but return only one - Guide
- Transfer data from one excel worksheet to another automatically - Guide
- Excel if statement - Guide
- Tmobile data check - Guide
4 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Aug 8, 2009 at 09:13 PM
Aug 8, 2009 at 09:13 PM
I wondear wheher any quantitative condtion can be sued in validation.
however you can haae an event code which may solve your problem
You know how to create validation in A1 with "yes" or "no"
right click sheet tab and click view code
and in that window copy paste this event code
now choose "yes" in A1 and type in B1 some number less than 51 see what happens.
similarly choose "no" for A1 and type in B1 some number more than 50 what happens
if the correct number is entered nothing will happen.
try.
however you can haae an event code which may solve your problem
You know how to create validation in A1 with "yes" or "no"
right click sheet tab and click view code
and in that window copy paste this event code
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address <> "$B$1" Then Exit Sub If Target = "" Then Exit Sub If Target.Offset(0, -1) = "yes" And Target < 51 Then MsgBox "you should enter a number more than or equel to 51" Target.Clear End If If Target.Offset(0, -1) = "no" And Target > 50 Then MsgBox "you should enter number less than or equal to 50" Target.Clear End If End Sub
now choose "yes" in A1 and type in B1 some number less than 51 see what happens.
similarly choose "no" for A1 and type in B1 some number more than 50 what happens
if the correct number is entered nothing will happen.
try.