Notifications
Clear all

Validação com base em outra celula

4 Posts
3 Usuários
0 Reactions
1,524 Visualizações
(@marciobin)
Posts: 0
New Member
Topic starter
 

Boa noite ,
olhando alguns modelos de planilhas , encontrei uma que tem uma função bacana .
A validação de dados de uma célula funciona com base em outra célula .

Porém , a mesma esta bloqueada e não tem como saber como foi feito .

Segue modelo do que preciso , e imagem da planilha que citei acima .
Vlew .Se alguém puder ajudar fico grato ...

 
Postado : 19/08/2018 4:32 pm
(@fcarlosc)
Posts: 0
New Member
 

Boa-noite marciobin

A senha para desbloqueio não seria !?

"*****"

 
Postado : 19/08/2018 7:02 pm
(@xlarruda)
Posts: 0
New Member
 

Veja se é isso o que deseja:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then
Exit Sub
End If
If Target.Column = 4 And Target.Row > 10 And Target.Value = "" Then
Target.Offset(0, 1).Validation.Delete
Target.Offset(0, 1).ClearContents
ElseIf Target.Column = 4 And Target.Row > 10 And Target.Value <> "" Then
With Target.Offset(0, 1).Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="A,B"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = "ATENÇÃO"
        .InputMessage = ""
        .ErrorMessage = "VÁLIDOS SOMENTE VALORES QUE ESTÁ NO FILTRO !"
        .ShowInput = True
        .ShowError = True
    End With
    End If
End Sub
 
Postado : 20/08/2018 7:47 am
(@marciobin)
Posts: 0
New Member
Topic starter
 

Fcarlosc , a senha não é essa , mais valew.

xlarruda , Exatamente isso .mais uma vez muito obrigado . Vou adaptar a minha planilha de uso .Vlew.

 
Postado : 20/08/2018 4:24 pm