Hello again!!
I've tried to execute this loop but it doesn't work. I need to define 2 variables, "i" and "j". The idea is that if "i" is 8, in the same loop "j" must be 2. And in the next loop "i" must be increased in one unity to de right (next column) and "j" down (next row).
Any idea to solve it??
______________
Sub Macro2()
Dim Indices, Seleccion As Worksheet
Set Indices = Sheets("C.Indices")
Set Seleccion = Sheets("Sel.Mes")
LastCol = Indices.Cells(1, Columns.Count).End(xlToLeft).Column
LastRow = Seleccion.Cells(sht.Rows.Count, "A").End(xlUp).Row
For i = 8 To LastCol
For j = 2 To LastRow
Sheets("C.Indices").Select
Columns(i).Select
Selection.Copy
Sheets("CALCULOS").Select
Columns("D:D").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Goto Reference:="R318C50"
Range("BR318:CK318").Select
Selection.Copy
Seleccion.Cells(j, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next i
Next j
End Sub
I've tried to execute this loop but it doesn't work. I need to define 2 variables, "i" and "j". The idea is that if "i" is 8, in the same loop "j" must be 2. And in the next loop "i" must be increased in one unity to de right (next column) and "j" down (next row).
Any idea to solve it??
______________
Sub Macro2()
Dim Indices, Seleccion As Worksheet
Set Indices = Sheets("C.Indices")
Set Seleccion = Sheets("Sel.Mes")
LastCol = Indices.Cells(1, Columns.Count).End(xlToLeft).Column
LastRow = Seleccion.Cells(sht.Rows.Count, "A").End(xlUp).Row
For i = 8 To LastCol
For j = 2 To LastRow
Sheets("C.Indices").Select
Columns(i).Select
Selection.Copy
Sheets("CALCULOS").Select
Columns("D:D").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Goto Reference:="R318C50"
Range("BR318:CK318").Select
Selection.Copy
Seleccion.Cells(j, 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Next i
Next j
End Sub