Thread
:
HELP copy and paste
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_2_]
external usenet poster
Posts: 1,522
HELP copy and paste
Please ONLY post in ONE place. See your other post
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"stacia" wrote in message
...
I am trying to copy a range of cells and paste them after every Total
This is what I have so far:
Sub b8pastetitle()
Dim theRange As Range
Dim lastrow&, firstRow&, x&
Set theRange = ActiveSheet.UsedRange
lastrow = theRange.Cells(theRange.Cells.Count).Row
firstRow = theRange.Cells(1).Row
For x = lastrow To firstRow Step -1
If InStr(1, Cells(x, 1), "Total") 0 Then
Range("A5 : G7").Select
Selection.Copy
ActiveSheet.Paste Destination:=Worksheets("Payroll").Cells(x + 2,
1).Selection.Paste
End If
Next
End Sub
--
Stacia
Reply With Quote
Don Guillett[_2_]
View Public Profile
Find all posts by Don Guillett[_2_]