Quantcast
Channel: "If And Then" não funciona
Viewing all articles
Browse latest Browse all 5

"If And Then" não funciona

$
0
0

boa noite

tentei adaptar o codigo abaixo para a planilha, mais nao funciona, mesmo as 2 condicoes sendo verdadeiras.

Dim lngRowsCount As Long
    For lngRowsCount = Cells(Rows.Count, "C").End(xlUp).Row To 2 Step -1
      If ((Cells(lngRowsCount, "A") = TxtCadastro.Value) And (Cells(lngRowsCount, "B") = TxtNome.Value)) Then
        If Cells(lngRowsCount, "C") = "Admitido" Then
            Cells(lngRowsCount, "C") = "Admitido>"
        End If
       End If
    Next lngRowsCount

detalhe: usando o "or" o codigo aceiita

obrigado


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images