Olá, muito boa noite!
Estou com uma dificuldade com vba excel, preciso de uma validação de informações.
Tenho uma planilha um "dashboard" onde coloco algumas informações vinda de uma outra planilha um "BD", Preciso fazer uma validação para ver ser já existe essa informação no meu deashboard, como eu posso fazer essa validação, para que
não tenha itens duplicados.
Muito obrigado pela atenção.
Atenciosamente,
Guilherme Sinhroini
Sub AtualizarPainel()
Dim LastRow, LastRow2, LastRowPainelControle As Integer
Dim Contador As Integer
'Set sht = ActiveSheet
Sheets("Painel_Controle").Activate
LastRowPainelControle = Cells(Rows.Count, "D").End(xlUp).Row - 1
'End With
Sheets("BD_Pedidos").Activate
LastRow = Cells(Rows.Count, "C").End(xlUp).Row
Range("C2:C" & LastRow).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("BJ2"), Unique:=True
LastRow2 = Cells(Rows.Count, "BJ").End(xlUp).Row
Contador = 0
For Each c In Range("BR3:BR" & LastRow2)
Sheets("Painel_Controle").Range("C2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "C").Value 'Num.Pedido
Sheets("Painel_Controle").Range("D2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "E").Value 'Unidade
Sheets("Painel_Controle").Range("E2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "G").Value 'Nome Fornecedor
Sheets("Painel_Controle").Range("F2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "M").Value 'Gestor da Conta
Sheets("Painel_Controle").Range("G2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "N").Value 'Data Solicitação
Sheets("Painel_Controle").Range("H2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "P").Value 'Inicio Safra
Sheets("Painel_Controle").Range("I2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "Q").Value 'Fim Safra
Sheets("Painel_Controle").Range("J2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "X").Value 'Inicio Estimado
Sheets("Painel_Controle").Range("K2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "Y").Value 'Fim Estimado
Sheets("Painel_Controle").Range("L2").Offset(LastRowPainelControle + Contador, 0).Value = Cells(2, "AE").Value 'Atividade Global
Sheets("Painel_Controle").Range("M2").Offset(LastRowPainelControle + Contador, 0).Value = Format(WorksheetFunction.Sum(Range("BE2:BE" & LastRow)), "Currency")
Sheets("Painel_Controle").Range("N2").Offset(LastRowPainelControle + Contador, 0).Value = Format(WorksheetFunction.Sum(Range("BB2:BB" & LastRow)) - WorksheetFunction.Sum(Range("BE2:BE" & LastRow)), "Currency")
Sheets("Painel_Controle").Range("O2").Offset(LastRowPainelControle + Contador, 0).Value = Format(WorksheetFunction.Sum(Range("BB2:BB" & LastRow)), "Currency")
'Valor Total com Subsidio Subsidio Valor Total Liquido
Contador = Contador + 1
Next
End