De forma resumida, o código
If Range("G16").Value = "" Then
Range("G15:H15").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Plan13").Select
Columns("AH:AH").Select
c = Selection.Find(What:="", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Else
Range("G15:H15").Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Plan13").Select
Columns("AH:AH").Select
c = Selection.Find(What:="", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
Se repete após cada Sheets("MÊS").Select
gostaria de saber se MÊS pode ser uma variável que rode a macro pra cada valor de JANEIRO a DEZEMBRO.... tipo um loop
Deu pra entender agora, ou ainda tá confuso?
Postado : 21/06/2014 1:48 pm