Bom dia
Pessoal
Aonde trabalho o pessoal tem dificuldades com excel, estou tentando deixar o mais simples possível a planilha, a aba Pedidos é como é feito a exportação do sistema aonde trabalho, eu preciso que ao clicar no botão gerar relatório ele fique como o da aba Agrupar e que seja feito a soma, para que seja enviado a cliente.
Essa planilha será a base, sempre os dados serão alterados.
Se alguém puder me ajudar agradeço.
Atenciosamente,
Elizeu.
Bom dia!!
Se alguém puder me ajudar agradeço.
Sem seu arquivo modelo, ao menos para mim é impossível!!
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Desculpa.
Arquivo anexo.
Boa tarde!!
Tente
Sub AleVBA_16024() Dim lastrow As Long Application.ScreenUpdating = False With Worksheets("Agrupar") lastrow = .Cells(Rows.Count, "B").End(xlUp).Row .AutoFilterMode = False .Range("O1") = "AleVBA" .Range("O2:O" & lastrow).Formula = "=COUNTIF($F$2:F2,F2)>1" .Range("O1:O" & lastrow).AutoFilter field:=1, Criteria1:="VERDADEIRO" .Range("A2:E" & lastrow).Offset(1, 0).SpecialCells(xlCellTypeVisible).ClearContents .AutoFilterMode = False .Range("O1:O" & lastrow).ClearContents End With Application.ScreenUpdating = True End Sub
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Boa tarde!!
Tente
Sub AleVBA_16024() Dim lastrow As Long Application.ScreenUpdating = False With Worksheets("Agrupar") lastrow = .Cells(Rows.Count, "B").End(xlUp).Row .AutoFilterMode = False .Range("O1") = "AleVBA" .Range("O2:O" & lastrow).Formula = "=COUNTIF($F$2:F2,F2)>1" .Range("O1:O" & lastrow).AutoFilter field:=1, Criteria1:="VERDADEIRO" .Range("A2:E" & lastrow).Offset(1, 0).SpecialCells(xlCellTypeVisible).ClearContents .AutoFilterMode = False .Range("O1:O" & lastrow).ClearContents End With Application.ScreenUpdating = True End SubAtt
Teria como ao criar um botão para ele exporta os dados para outra aba e excluir as colunas Cod. de Separação, Status e no final da coluna Peso e Volume e efetuar a soma.
Desde já agradeço a ajuda.
Atenciosamente,
Elizeu.
Boa tarde!!
Não encontrei a coluna Cod. de Separação!
Como deve ser essa soma?
Option Explicit Sub AleVBA_16024V2() Dim sh As Worksheet Dim ws As Worksheet Dim lastrow As Long Set sh = Worksheets("Pedidos") Set ws = Worksheets("Agrupar") sh.Activate Application.ScreenUpdating = False ws.Cells.Clear sh.Range("A1", Range("N" & Rows.Count).End(xlUp)).Copy ws.Range("A65536").End(xlUp)(2) With ws lastrow = .Cells(Rows.Count, "B").End(xlUp).Row .Rows(1).EntireRow.Delete .AutoFilterMode = False .Range("O1") = "AleVBA" .Range("O2:O" & lastrow).Formula = "=COUNTIF($F$2:F2,F2)>1" .Range("O1:O" & lastrow).AutoFilter field:=1, Criteria1:="VERDADEIRO" .Range("A2:E" & lastrow).Offset(1, 0).SpecialCells(xlCellTypeVisible).ClearContents .AutoFilterMode = False .Range("O1:O" & lastrow).ClearContents .Columns(8).EntireColumn.Delete 'além da coluna Status não Cod. de Separação .Range("H" & lastrow).Formula = "=SUBTOTAL(9,H2:H" & lastrow - 1 & ")" .Range("I" & lastrow).Formula = "=SUBTOTAL(9,I2:I" & lastrow - 1 & ")" End With Application.ScreenUpdating = True End Sub
Att
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Era isso mesmo o que eu precisava, muito obrigado.