rfvedcwsxqaz
Programmer
This is Macro is for selecting sorting and pasting values.
I was able to get the values from any column of the selection area to populate other cells, but I cant populate the correct number of cells without giving the exact range of the destination.
Among other things, I tried to use offset functions and I tried to rearrange the position of the var declaration.
Thanks for your help.
I was able to get the values from any column of the selection area to populate other cells, but I cant populate the correct number of cells without giving the exact range of the destination.
Among other things, I tried to use offset functions and I tried to rearrange the position of the var declaration.
Thanks for your help.
Code:
Public Sub copysort1()
Dim cell As Range
Dim rng As Range
Dim var1, var2, var3, var4, var5 As Variant
Set rng = Selection
With rng
var1 = .Columns("B")
'.Columns("B").Copy Sheets(2).Range("a1")
'- this works, but I cant use it, its not a variable
End With
'implementation
Range("h1") = var1
Range("g1:g11") = var1
End Sub