Hello! I'm absolutely ignorant of excel! I''m designing a macro but it is so slow because It's too long. I have read some posts here and I thing that a loop could accelerate its performance.
The concept is easy but I don't know how to do it, I'm sure that you can help me. I'm sorry for my english, I'm from another country!!
Here is the macro I'm writing:
What I want to do is a loop to start copying B1 but then C1, D1, E1, etc.
And then paste the result in B5, C5, D5, E5, etc.
Is there a way to do it automatically ans thus reduce dramatically the length of the macro??
The concept is easy but I don't know how to do it, I'm sure that you can help me. I'm sorry for my english, I'm from another country!!
Here is the macro I'm writing:
' Macro1 Macro
'
Sheets("Hoja2").Select
Range("B1").Select
Selection.Copy
Sheets("Historico").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "Hoja1.btnAceptar_Click"
Range("B7").Select
Range("B7:B400").Select
Selection.Copy
Sheets("Hoja2").Select
Range("B5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Hoja2").Select
Range("C1").Select
Selection.Copy
Sheets("Historico").Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Run "Hoja1.btnAceptar_Click"
Range("B7").Select
Range("B7:B400").Select
Selection.Copy
Sheets("Hoja2").Select
Range("C5").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
End Sub
What I want to do is a loop to start copying B1 but then C1, D1, E1, etc.
And then paste the result in B5, C5, D5, E5, etc.
Is there a way to do it automatically ans thus reduce dramatically the length of the macro??