Meinthecorner
Registered User.
- Local time
- Today, 16:45
- Joined
- Nov 29, 2008
- Messages
- 25
I have a sheet (AgentSummary) that lets the user cycle through a number of employee giving a score for various performance areas. There scores give a balanced score for the week. On a seperate sheet (WeeklySummary) the employees are all listed by row and week numbers across the top.
To save having to go through each record on the AgentSummary sheet, copy that employees weekly performance row and paste that to a new row on the WeeklySummary sheet, I cobbled together a basic loop shown below.
Its the 2nd time Ive used a loop, so the vba could probably be improved.
My question is, when the loop goes to the Weeklysummary sheet to paste the data over, how do I get it to start pasting it from row 6 and not row 2?
To save having to go through each record on the AgentSummary sheet, copy that employees weekly performance row and paste that to a new row on the WeeklySummary sheet, I cobbled together a basic loop shown below.
Its the 2nd time Ive used a loop, so the vba could probably be improved.
My question is, when the loop goes to the Weeklysummary sheet to paste the data over, how do I get it to start pasting it from row 6 and not row 2?
Code:
Sub CreateCard()
Application.ScreenUpdating = False
Sheets("WeeklySummary").Select
Cells.Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A1").Select
Sheets("AgentSummary").Select
Range("f160").Select
ActiveCell.FormulaR1C1 = "0"
Do
AgentNumber = 1 + AgentNumber
For Each cell In Range("f160")
cell.Value = cell.Value + 1
Range("J161:BO161").Select
Selection.Copy
Sheets("WeeklySummary").Range("a200").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
Sheets("AgentSummary").Select
Next cell
Loop While AgentNumber < 63
Sheets("AgentSummary").Select
Range("f160").Select
ActiveCell.FormulaR1C1 = "6"
Application.ScreenUpdating = True
End Sub