pretendo repetir varias vezes esta ação.
Veja como é a macro hoje. Se ela tivesse um comando de repetição eu não precisaria colocar ela linha por linha, da linha 19 a linha 50 eu fiz.
Não consegui anexar o arquivo, ele tem 300Kb e o limite é 100Kb.
Sheets("Resumo").Select
Range("A19").Select
Selection.Copy
Sheets("Detalhado").Select
Range("G2:I2").Select
ActiveSheet.Paste
Sheets("Resumo").Select
Range("F19").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(WORKDAY(R16C3,0),Detalhado!R11C6:R10000C9,4,FALSE),)"
Range("F19").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Resumo").Select
Range("A20").Select
Selection.Copy
Sheets("Detalhado").Select
Range("G2:I2").Select
ActiveSheet.Paste
Sheets("Resumo").Select
Range("F20").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(WORKDAY(R16C3,0),Detalhado!R11C6:R10000C9,4,FALSE),)"
Range("F20").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Resumo").Select
Range("A21").Select
Selection.Copy
Sheets("Detalhado").Select
Range("G2:I2").Select
ActiveSheet.Paste
Sheets("Resumo").Select
Range("F21").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(WORKDAY(R16C3,0),Detalhado!R11C6:R10000C9,4,FALSE),)"
Range("F21").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Resumo").Select
Range("A22").Select
Selection.Copy
Sheets("Detalhado").Select
Range("G2:I2").Select
ActiveSheet.Paste
Sheets("Resumo").Select
Range("F22").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(WORKDAY(R16C3,0),Detalhado!R11C6:R10000C9,4,FALSE),)"
Range("F22").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("Resumo").Select
Range("A23").Select
Selection.Copy
Sheets("Detalhado").Select
Range("G2:I2").Select
ActiveSheet.Paste
Sheets("Resumo").Select
Range("F23").Select
ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(WORKDAY(R16C3,0),Detalhado!R11C6:R10000C9,4,FALSE),)"
Range("F23").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Postado : 13/06/2014 12:52 pm