Good day to all,
im newbie on this vba and excel
i have this problem and search through the internet and try to compile but cant get fix the code the exact way i want
i like to paste a manually selected columns from sheet1 and paste to range E5 if not empty
an example is like this
i manually select a range of columns and if i press a command button it the range of column will be copied to sheet2 range E5 if not empty.
my code
Sub Button5_Click()
Dim LastColumn As Integer
Dim shFO, sh4 As Worksheet
shFO = Worksheets("Final Output")
sh4 = Worksheets("Sheet4")
With shFO
LastColumn = .Find(What:="*", After:=.Cells(5), Lookat:=xlPart, _
LookIn:=xlFormulas, SearchOrder:=xlByColumns, SearchDirection:=xlPrevious, _
MatchCase:=False).Column
sh4.Activate
Selection.Copy destination:=LastColumn
End With
End Sub
Bookmarks