RIC63
03-09-2016, 01:53 PM
I would like to take some values from specific position of a column and paste it in adiacent columns, the number of values to taken can vary then i'm looking for a macro that take as input ( via an input box or directly through a value placed in a cell ) the desired value to use as lenght of range.
for istance :
es. starting from K3 and going down of 3 cells (up to K5) and starting from K17 and going up of 3 cells (up to K15) start point and directions are fixed ....herebelow a small portion of code about wath i have made using the 'record macro' function but clearly far from giving me the desired result...
Sub Auto1()
'
' Auto1 Macro
'
Range("K3:K5").Select
Application.CutCopyMode = False
Selection.Copy
Range("AP4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("K15:K17").Select
Range("K17").Activate
Application.CutCopyMode = False
Selection.Copy
Range("AQ4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I apprieciate any suggestion
Thanks in advance
riccardo
for istance :
es. starting from K3 and going down of 3 cells (up to K5) and starting from K17 and going up of 3 cells (up to K15) start point and directions are fixed ....herebelow a small portion of code about wath i have made using the 'record macro' function but clearly far from giving me the desired result...
Sub Auto1()
'
' Auto1 Macro
'
Range("K3:K5").Select
Application.CutCopyMode = False
Selection.Copy
Range("AP4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("K15:K17").Select
Range("K17").Activate
Application.CutCopyMode = False
Selection.Copy
Range("AQ4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I apprieciate any suggestion
Thanks in advance
riccardo