![]() |
Macro - copy entire row and paste at bottom of another sheet
Hello,
I am trying to create a macro in which I can copy an entire row fro one sheet and paste it to the bottom of another sheet. (and some othe things within the macro) I am stuck on two pieces. First, I would like to select the entire ro in which the user has their curser in. Second, I can not figure ou how to paste it to the bottom (next blank row) of the other sheet. Here is my macro so far: Sub NotMeetCriteria() Rows("3:3").Select <-How do I select entire row? Selection.Copy Sheets("Did Not Meet Hiring Criteria").Select Rows("28:28").Select <- How do I paste to bottom of sheet? ActiveSheet.Paste Sheets("1-OPEN").Select Range("H3:P3").Select Application.CutCopyMode = False Selection.ClearContents ActiveWindow.SmallScroll ToRight:=-4 Range("A3").Select Sheets("Did Not Meet Hiring Criteria").Select Range("L28").Select ActiveWindow.SmallScroll ToRight:=2 End Sub Help...thanks! Mik -- Message posted from http://www.ExcelForum.com |
Macro - copy entire row and paste at bottom of another sheet
one way:
Public Sub NotMeetCriteria() ActiveCell.EntireRow.Copy Destination:= _ Sheets("1-OPEN").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End Sub In article , miker1999 wrote: Hello, I am trying to create a macro in which I can copy an entire row from one sheet and paste it to the bottom of another sheet. (and some other things within the macro) I am stuck on two pieces. First, I would like to select the entire row in which the user has their curser in. Second, I can not figure out how to paste it to the bottom (next blank row) of the other sheet. Here is my macro so far: Sub NotMeetCriteria() Rows("3:3").Select <-How do I select entire row? Selection.Copy Sheets("Did Not Meet Hiring Criteria").Select Rows("28:28").Select <- How do I paste to bottom of sheet? ActiveSheet.Paste Sheets("1-OPEN").Select Range("H3:P3").Select Application.CutCopyMode = False Selection.ClearContents ActiveWindow.SmallScroll ToRight:=-4 Range("A3").Select Sheets("Did Not Meet Hiring Criteria").Select Range("L28").Select ActiveWindow.SmallScroll ToRight:=2 End Sub Help...thanks! Mike --- Message posted from http://www.ExcelForum.com/ |
Macro - copy entire row and paste at bottom of another sheet
oops - lost track of which sheet you were pasting to.
Substitute "Did Not Meet Hiring Criteria" for "1-OPEN" In article , JE McGimpsey wrote: Public Sub NotMeetCriteria() ActiveCell.EntireRow.Copy Destination:= _ Sheets("1-OPEN").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End Sub |
Macro - copy entire row and paste at bottom of another sheet
I had similar problem and found this site very helpful.
http://www.rondebruin.nl/copy1.htm "miker1999 " wrote in message ... Hello, I am trying to create a macro in which I can copy an entire row from one sheet and paste it to the bottom of another sheet. (and some other things within the macro) I am stuck on two pieces. First, I would like to select the entire row in which the user has their curser in. Second, I can not figure out how to paste it to the bottom (next blank row) of the other sheet. Here is my macro so far: Sub NotMeetCriteria() Rows("3:3").Select <-How do I select entire row? Selection.Copy Sheets("Did Not Meet Hiring Criteria").Select Rows("28:28").Select <- How do I paste to bottom of sheet? ActiveSheet.Paste Sheets("1-OPEN").Select Range("H3:P3").Select Application.CutCopyMode = False Selection.ClearContents ActiveWindow.SmallScroll ToRight:=-4 Range("A3").Select Sheets("Did Not Meet Hiring Criteria").Select Range("L28").Select ActiveWindow.SmallScroll ToRight:=2 End Sub Help...thanks! Mike --- Message posted from http://www.ExcelForum.com/ |
Macro - copy entire row and paste at bottom of another sheet
Thank you very much! Now, I seem to be facing 3 more challanges.
1... In the code, after the copy of the row, I would like to clear the contents of the row that the user selected in "1-OPEN" only of columns H:P. 2... I would like column A of the row in "1-OPEN" that the user selected to change to "OPEN". 3.. I would like the user to end up in the sheet ("Did Not Meet Hiring Criteria") in the row that was just pasted in and in column L of that row. (they will need to type in some text there..) Here is the code as it stands. Sub NotMeetCriteria() ActiveCell.EntireRow.Copy Destination:= _ Sheets("Did Not Meet Hiring Criteria").Range("A" & Rows.Count).End(xlUp).Offset(1, 0) End Sub Help...thanks! Mike --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 01:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com