Hi guys I'm trying to copy and paste a title and subtotal from a range of data in columns AD:AF;
Example;
BH113 13/03/2013 72
13/03/2013 106
13/03/2013 67
Total 245
BH114 5/03/2013 92
7/03/2013 77
13/03/2013 90
14/03/2013 59
18/03/2013 52
19/03/2013 44
21/03/2013 88
Total 502
CR102 25/03/2013 107
27/03/2013 117
Total 224
I want to paste the information in columns O:P to look like the following as a summary, so the data needs to be pasted as values only;
BH113 245
BH114 502
CR102 224
Here is the code I have so far,
Sub AAmonth()
Range("AD3").Select 'this is the fisrt cell with data (BH113)
Do Until Selection.Value = ""
Selection.Copy Destination:=Range("O3", Range("O" & Rows.Count).End(xlUp).Offset(1, 0))
Selection.Offset(, 2).End(xlDown).Select
Selection.Copy Destination:=Range("P3", Range("P" & Rows.Count).End(xlUp).Offset(1, 0))
Selection.Offset(2, -2).Select
Loop
End Sub
This code copies the data into the correct columns, but it doesn't paste values only and the data from clolumn AD all ends up as the last value (CR102)
Help would be greatly appreciated.
Bookmarks