Markiepoop
01-28-2017, 11:27 PM
Every month, I have to compile a list of names. I've decided to write a macro for it but have come across a problem: I can't paste the contents from one sheet to one row after the last active row on another sheet.
Could someone help take a look at the code and tell me where I went wrong?
With ActiveWorkbook.Worksheets(1).AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
Range("A2:D2" & lRow).CurrentRegion.Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy '
Sheets(Sheets.Count).Select
.Range("A" & .Rows.Count).End(xlUp).Offset(2).Select
ActiveCell.Paste
Here is the excel sheet if you are interested in taking a look. What i'm trying to do is to delete all irrelevant columns, separate the two schemes (DX/QQ), make a third sheet, have the QQ be above while the DX a row below the last active row of the QQ personnel.
Appreciate all help i can get. Thanks!
18178
Could someone help take a look at the code and tell me where I went wrong?
With ActiveWorkbook.Worksheets(1).AutoFilter.Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
Range("A2:D2" & lRow).CurrentRegion.Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy '
Sheets(Sheets.Count).Select
.Range("A" & .Rows.Count).End(xlUp).Offset(2).Select
ActiveCell.Paste
Here is the excel sheet if you are interested in taking a look. What i'm trying to do is to delete all irrelevant columns, separate the two schemes (DX/QQ), make a third sheet, have the QQ be above while the DX a row below the last active row of the QQ personnel.
Appreciate all help i can get. Thanks!
18178