View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
PCOR PCOR is offline
external usenet poster
 
Posts: 77
Default Need help for sure

Thanks for the bery fast response BUT...here is the code I used
Private Sub CommandButton1_Click()
Dim rng As Range
Set rng = Cells(1, "IV").End(xlToLeft)
rng.Offset(0, -1).Resize(15, 2).Copy
Destination = Worksheets("compare").Range("A1")

End Sub

When the macro got to rng Offset(0,-1)Resize(15,2).Copy
I got the following error message

Run time error "1004"
Application-defined or object -defined error

Help
Ian M


"Tom Ogilvy" wrote in message
...
Dim rng as Range
set rng = Cells(1,"IV").End(xltoLeft)
rng.offset(0,-1).Resize(15,2).copy
Destination:=Worksheets("Sheet3").Range("A1")

--
Regards,
Tom Ogilvy

"PCOR" wrote in message
...
I currently have data in col A,B,C,D row 1 to 15 in each col
I was to copy the last two col(ie c1 to d15 to an other sheet
Now the catch.
Every week I add another col to this data.
So next week I will have COL a,b,c,d,e row 1 to 15 in each.
Now I want to copy Col d1 to e15 to an other sheet.
Need help with that
Thanks
Ian M