Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello,
Is it possible to have multiple validation rules per cell? I would like it if I could give a warning if the input was within a certain range of values, and a stop message if it was between another. Thank you. Richard. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Don't think so using DV, you could do it with VBA.
-- __________________________________ HTH Bob "VoxBox-Richard" wrote in message ... Hello, Is it possible to have multiple validation rules per cell? I would like it if I could give a warning if the input was within a certain range of values, and a stop message if it was between another. Thank you. Richard. |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Can you any help me doing in using VB then? Or provide me a link explaining
how to do it. Cheers. R. "Bob Phillips" wrote: Don't think so using DV, you could do it with VBA. -- __________________________________ HTH Bob "VoxBox-Richard" wrote in message ... Hello, Is it possible to have multiple validation rules per cell? I would like it if I could give a warning if the input was within a certain range of values, and a stop message if it was between another. Thank you. Richard. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Something like this
Option Explicit Private mmPrev As Variant Private Sub Worksheet_Change(ByVal Target As Range) Const WS_RANGE As String = "H1:H10" '<== change to suit On Error GoTo ws_exit Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then With Target 'reject check If .Value < 0 Or .Value 10 Then MsgBox "Invalid value", vbOKOnly, "Input Error" .Value = mmPrev ElseIf .Value 5 Then MsgBox "Value may be too high", vbOKOnly, "Input Warning" End If End With End If ws_exit: Application.EnableEvents = True End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) mmPrev = Target.Value End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- __________________________________ HTH Bob "VoxBox-Richard" wrote in message ... Can you any help me doing in using VB then? Or provide me a link explaining how to do it. Cheers. R. "Bob Phillips" wrote: Don't think so using DV, you could do it with VBA. -- __________________________________ HTH Bob "VoxBox-Richard" wrote in message ... Hello, Is it possible to have multiple validation rules per cell? I would like it if I could give a warning if the input was within a certain range of values, and a stop message if it was between another. Thank you. Richard. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
multiple choice data validation | Excel Discussion (Misc queries) | |||
Multiple Data Validation | Excel Discussion (Misc queries) | |||
Data Validation - Multiple Dependencies | Excel Discussion (Misc queries) | |||
Data Validation - Multiple Options | Excel Discussion (Misc queries) | |||
Multiple Data Validation Criterias | Excel Worksheet Functions |