Eu continuo com dificuldade em entender vossas demandas, contudo experimente:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Range("F14") = "Animal" And ActiveCell.Value = "Gato" Then ActiveCell.Value = ActiveCell & Right(Year(Date), 2) + 1
If Range("F14") = "Animal" And ActiveCell.Value = "Avez" Or ActiveCell.Value = "Peixe" Then
ActiveCell.Value = ActiveCell & Right(Year(Date), 2)
End If
If Range("f14") = "Frutas" And ActiveCell.Value = "Laranja" Then ActiveCell.Value = ActiveCell & Right(Year(Date), 2) + 1
If Range("f14") = "Frutas" And ActiveCell.Value = "Abacaxi" Or ActiveCell.Value = "Pera" Then
ActiveCell.Value = ActiveCell & Right(Year(Date), 2)
End If
Application.EnableEvents = True
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 06/12/2017 6:32 am