Obrigado.
fiz um avanço aqui... ao menos consegui abrir fazer a primeira planilha abrir a segunda... mas fiz alguma coisa errada na hora de indicar as células onde vou buscar os dados (usei as referencias que vc indicou, mas óvbio que nao vai funcionar no meu modelo).
Na verdade que preciso que a macro copie toda a planilha "lançamentos" e cole todo o conteúdo na planilha "MACRO CIELO" , o comando é o selecionar tudo (linhas e colunas)
http://prntscr.com/7kejps
como ficou o código:
Sub AJUSTAR_PLANILHACSV_CIELO()
'
' AJUSTAR_PLANILHACSV_CIELO Macro
' alinha as colunas e formata valores como moeda insere linhas e cola resumo c fórmulas
'
' Atalho do teclado: Ctrl+g
'
Workbooks.Open Filename:="\L:DENES1. FINANCEIROlancamentos.csv"
Windows("lancamentos.csv").Activate
Sheets("lancamentos").Range(Sheets("lancamentos").Cells, Sheets("lançamentos").Cells(7, 8)).Copy
Windows("MACRO CIELO").Activate
Sheets("MACRO CIELO").Range(Sheets("Colar CSV").Cells(LINHA2 + L_CTTO, 10), Sheets("lançamentos").Cells(LINHA2 + L_CTTO, 12)).PasteSpecial Paste:=xlPasteValues
Cells.Select
Cells.EntireColumn.AutoFit
Range("G2").Select
Selection.Copy
Columns("G:H").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
Selection.Copy
Columns("J:J").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWindow.SmallScroll Down:=366
ActiveWindow.ScrollRow = 366
ActiveWindow.ScrollRow = 365
ActiveWindow.ScrollRow = 363
ActiveWindow.ScrollRow = 361
ActiveWindow.ScrollRow = 360
ActiveWindow.ScrollRow = 358
ActiveWindow.ScrollRow = 356
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 352
ActiveWindow.ScrollRow = 350
ActiveWindow.ScrollRow = 347
ActiveWindow.ScrollRow = 344
ActiveWindow.ScrollRow = 343
ActiveWindow.ScrollRow = 341
ActiveWindow.ScrollRow = 339
ActiveWindow.ScrollRow = 337
ActiveWindow.ScrollRow = 335
ActiveWindow.ScrollRow = 332
ActiveWindow.ScrollRow = 330
ActiveWindow.ScrollRow = 328
ActiveWindow.ScrollRow = 325
ActiveWindow.ScrollRow = 322
ActiveWindow.ScrollRow = 319
ActiveWindow.ScrollRow = 316
ActiveWindow.ScrollRow = 313
ActiveWindow.ScrollRow = 310
ActiveWindow.ScrollRow = 306
ActiveWindow.ScrollRow = 304
ActiveWindow.ScrollRow = 301
ActiveWindow.ScrollRow = 298
ActiveWindow.ScrollRow = 295
ActiveWindow.ScrollRow = 294
ActiveWindow.ScrollRow = 291
ActiveWindow.ScrollRow = 288
ActiveWindow.ScrollRow = 284
ActiveWindow.ScrollRow = 280
ActiveWindow.ScrollRow = 274
ActiveWindow.ScrollRow = 269
ActiveWindow.ScrollRow = 265
ActiveWindow.ScrollRow = 261
ActiveWindow.ScrollRow = 258
ActiveWindow.ScrollRow = 255
ActiveWindow.ScrollRow = 251
ActiveWindow.ScrollRow = 247
ActiveWindow.ScrollRow = 243
ActiveWindow.ScrollRow = 239
ActiveWindow.ScrollRow = 235
ActiveWindow.ScrollRow = 232
ActiveWindow.ScrollRow = 229
ActiveWindow.ScrollRow = 226
ActiveWindow.ScrollRow = 222
ActiveWindow.ScrollRow = 219
ActiveWindow.ScrollRow = 216
ActiveWindow.ScrollRow = 212
ActiveWindow.ScrollRow = 208
ActiveWindow.ScrollRow = 205
ActiveWindow.ScrollRow = 202
ActiveWindow.ScrollRow = 198
ActiveWindow.ScrollRow = 194
ActiveWindow.ScrollRow = 191
ActiveWindow.ScrollRow = 188
ActiveWindow.ScrollRow = 185
ActiveWindow.ScrollRow = 181
ActiveWindow.ScrollRow = 178
ActiveWindow.ScrollRow = 173
ActiveWindow.ScrollRow = 167
ActiveWindow.ScrollRow = 165
ActiveWindow.ScrollRow = 160
ActiveWindow.ScrollRow = 156
ActiveWindow.ScrollRow = 153
ActiveWindow.ScrollRow = 149
ActiveWindow.ScrollRow = 146
ActiveWindow.ScrollRow = 143
ActiveWindow.ScrollRow = 140
ActiveWindow.ScrollRow = 136
ActiveWindow.ScrollRow = 133
ActiveWindow.ScrollRow = 130
ActiveWindow.ScrollRow = 127
ActiveWindow.ScrollRow = 123
ActiveWindow.ScrollRow = 118
ActiveWindow.ScrollRow = 115
ActiveWindow.ScrollRow = 112
ActiveWindow.ScrollRow = 108
ActiveWindow.ScrollRow = 105
ActiveWindow.ScrollRow = 101
ActiveWindow.ScrollRow = 97
ActiveWindow.ScrollRow = 94
ActiveWindow.ScrollRow = 90
ActiveWindow.ScrollRow = 86
ActiveWindow.ScrollRow = 83
ActiveWindow.ScrollRow = 80
ActiveWindow.ScrollRow = 77
ActiveWindow.ScrollRow = 75
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 48
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 9
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 3
ActiveWindow.ScrollRow = 2
ActiveWindow.ScrollRow = 1
Columns("J:J").EntireColumn.AutoFit
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Sheets("FÓRMULA").Select
Rows("1:11").Select
Selection.Copy
Sheets("COLAR CSV").Select
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Range("A1").Select
Application.CutCopyMode = False
' COPIAR_VALOR_BRUTO Macro
'
' Atalho do teclado: Ctrl+b
'
Range("B2:C9").Select
Selection.Copy
End Sub
Postado : 23/06/2015 11:34 am