any clue why this won't work?
Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1,
0)).EntireRow.Value.Copy _ Destination:=Worksheets(1).Range("A16") |
any clue why this won't work?
any error report ?
|
any clue why this won't work?
You can't do .entirerow.value.copy
You can do .entirerow.copy and then paste special values. So something like this perhaps... Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Copy Worksheets(1).Range("A16").pastespecial(xlpasteval ues) Application.cutcopymode = false -- HTH... Jim Thomlinson "Calle" wrote: Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Value.Copy _ Destination:=Worksheets(1).Range("A16") |
any clue why this won't work?
NextEmpty could be in row one and Offset(-1,0) gives you row zero.
Also, it is not possible to paste the contents of an entire row into another row starting at column 16. ( try A1 not A16) Following these guidelines helps us all out... http://www.cpearson.com/excel/newposte.htm -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Calle" wrote in message Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Value.Copy _ Destination:=Worksheets(1).Range("A16") |
any clue why this won't work?
Isn't that Row 16 which is perfectly acceptable?
-- HTH... Jim Thomlinson "Jim Cone" wrote: NextEmpty could be in row one and Offset(-1,0) gives you row zero. Also, it is not possible to paste the contents of an entire row into another row starting at column 16. ( try A1 not A16) Following these guidelines helps us all out... http://www.cpearson.com/excel/newposte.htm -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Calle" wrote in message Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Value.Copy _ Destination:=Worksheets(1).Range("A16") |
any clue why this won't work?
Jim,
Depends on which universe you are in. <g Thanks for catching that. Sincerely, Jim Cone "Jim Thomlinson" wrote in message Isn't that Row 16 which is perfectly acceptable? -- HTH... Jim Thomlinson "Jim Cone" wrote: NextEmpty could be in row one and Offset(-1,0) gives you row zero. Also, it is not possible to paste the contents of an entire row into another row starting at column 16. ( try A1 not A16) Following these guidelines helps us all out... http://www.cpearson.com/excel/newposte.htm -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Calle" wrote in message Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Value.Copy _ Destination:=Worksheets(1).Range("A16") |
any clue why this won't work?
Here is the original code:
Sub testme() Dim myCell As Range Dim NextEmpty As Range Set myCell = ActiveSheet.Range("a16") Do If myCell.Value = "" Then Set NextEmpty = myCell Exit Do Else Set myCell = myCell.Offset(1, 0) End If Loop Range("A16", NextEmpty.offset(-1,0).EntireRow.copy _ Destination:=Worksheets(2).Range("A1") End Sub it didn't have a value in the last line. -- Regards, Tom Ogilvy "Calle" wrote in message ... Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Value.Copy _ Destination:=Worksheets(1).Range("A16") |
any clue why this won't work?
I have standing reservations in that universe... :-)
-- HTH... Jim Thomlinson "Jim Cone" wrote: Jim, Depends on which universe you are in. <g Thanks for catching that. Sincerely, Jim Cone "Jim Thomlinson" wrote in message Isn't that Row 16 which is perfectly acceptable? -- HTH... Jim Thomlinson "Jim Cone" wrote: NextEmpty could be in row one and Offset(-1,0) gives you row zero. Also, it is not possible to paste the contents of an entire row into another row starting at column 16. ( try A1 not A16) Following these guidelines helps us all out... http://www.cpearson.com/excel/newposte.htm -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Calle" wrote in message Worksheets("resultatpivot3").Range("A16", NextEmpty.Offset(-1, 0)).EntireRow.Value.Copy _ Destination:=Worksheets(1).Range("A16") |
All times are GMT +1. The time now is 07:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com