Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select insert row? 1

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
I have the following piece of code that needs a minor adjustment! the PasteSpecial needs to go into the row that I just inserted not into the Range("InsertHere"). How can I do that?
Thanks for any help!

leslie

Sub Copy_Formulas() 'copies each Interviewer name to formulas,
'then copies the result of the formulas to the Monthly report.
For Each c In Range("Interviewers")
c.Copy ("int_name")
Range("frms").Copy
Range("inserthere").Insert shift:=xlDown
Range("inserthere").PasteSpecial ([Paste:= xlPasteValues])
Next

Range("inserthere").Delete shift:=xlUp

Worksheets("MonthlyReport").Select

End Sub
 
I believe the following will do the job...

Sub Copy_Formulas() 'copies each Interviewer name to formulas,
'then copies the result of the formulas to the Monthly report.
Application.ScreenUpdating = False
Application.Goto Reference:="sumtop"
For Each c In Range("Interviewers")
c.Copy ("int_name")
Range("frms").Copy
ActiveSheet.Paste
Selection.Copy
Selection.PasteSpecial Paste:=xlValues
ActiveCell.Offset(1, 0).Select
Next
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub

Reminder: to assign the range name "sumtop" to the first cell under "Name" in the MonthlyReport.

(This routine can be activated from any sheet.)

Hope this helps. :) Please advise as to how you make out.

Regards, ...Dale Watson

HOME: nd.watson@shaw.ca
WORK: dwatson@bsi.gov.mb.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top