View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Macro help - copy row, clear, and paste on different sheet

Mike,

Assuming that "1-OPEN" is a worksheet:

Sub NotMeetCriteria()
Dim rng As Range

Set rng = Sheets("Did Not Meet Hiring Criteria").Range("A" &
Rows.Count).End(xlUp).Offset(1, 0)

ActiveCell.EntireRow.Copy Destination:=rng

With Cells(ActiveCell.Row, 1)
.Offset(0, 8 - 1).Resize(1, 9).ClearContents
.Value = "OPEN"
End With

rng.Worksheet.Activate
rng.Select
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"miker1999 " wrote in message
...
Hi, I need a little more help with a macro.

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/