ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Amending another formula (https://www.excelbanter.com/excel-discussion-misc-queries/197428-amending-another-formula.html)

leerem

Amending another formula
 
Sorry to be a pain once again.

I need to copy over rows BE to BY but only by the number of rows in column AX
I've tried the code as below but the code comes to a halt on line 3

what have i done wrong , its probabley simple but I cant see it...

Lastrow = Cells(Rows.Count, "ax").End(xlUp).Row
Range("BE11:BY11").Copy
Range("Be12:Be" & Lastrow).PasteSpecial Paste:=xlPasteAll,
operation:=xlNone, _
skipblanks:=False, Transpose:=False

Mike H

Amending another formula
 
Hi,

Your question is very ambiguous. You can only paste what you have copied so
the decision needs to be made at copy time.

lastrow = Cells(Rows.Count, "ax").End(xlUp).Row
Range("BE" & lastrow & ":BY" & lastrow).Copy

Is that what yo mean?

Mike

"leerem" wrote:

Sorry to be a pain once again.

I need to copy over rows BE to BY but only by the number of rows in column AX
I've tried the code as below but the code comes to a halt on line 3

what have i done wrong , its probabley simple but I cant see it...

Lastrow = Cells(Rows.Count, "ax").End(xlUp).Row
Range("BE11:BY11").Copy
Range("Be12:Be" & Lastrow).PasteSpecial Paste:=xlPasteAll,
operation:=xlNone, _
skipblanks:=False, Transpose:=False


leerem

Amending another formula
 
i'll try to exlpain a bit better; I need to select cells BE11:BY11 and copy
the contents of these cells to BE12:BE by the number of rows in columb AX.
eg Col AX = 40 lines

select BE11:BY11 and copy the contents of these cell to
Col (" BE12:BE12" + the no. of rows in AX" eg 40 therby BE12:BE52



"Mike H" wrote:

Hi,

Your question is very ambiguous. You can only paste what you have copied so
the decision needs to be made at copy time.

lastrow = Cells(Rows.Count, "ax").End(xlUp).Row
Range("BE" & lastrow & ":BY" & lastrow).Copy

Is that what yo mean?

Mike

"leerem" wrote:

Sorry to be a pain once again.

I need to copy over rows BE to BY but only by the number of rows in column AX
I've tried the code as below but the code comes to a halt on line 3

what have i done wrong , its probabley simple but I cant see it...

Lastrow = Cells(Rows.Count, "ax").End(xlUp).Row
Range("BE11:BY11").Copy
Range("Be12:Be" & Lastrow).PasteSpecial Paste:=xlPasteAll,
operation:=xlNone, _
skipblanks:=False, Transpose:=False


Mike H

Amending another formula
 
Hi,

BE11 - BY11 is 21 cells. If lastrow evaluates as 40 as in your example what
goes in the other 19 cells?

Mike

"leerem" wrote:

i'll try to exlpain a bit better; I need to select cells BE11:BY11 and copy
the contents of these cells to BE12:BE by the number of rows in columb AX.
eg Col AX = 40 lines

select BE11:BY11 and copy the contents of these cell to
Col (" BE12:BE12" + the no. of rows in AX" eg 40 therby BE12:BE52



"Mike H" wrote:

Hi,

Your question is very ambiguous. You can only paste what you have copied so
the decision needs to be made at copy time.

lastrow = Cells(Rows.Count, "ax").End(xlUp).Row
Range("BE" & lastrow & ":BY" & lastrow).Copy

Is that what yo mean?

Mike

"leerem" wrote:

Sorry to be a pain once again.

I need to copy over rows BE to BY but only by the number of rows in column AX
I've tried the code as below but the code comes to a halt on line 3

what have i done wrong , its probabley simple but I cant see it...

Lastrow = Cells(Rows.Count, "ax").End(xlUp).Row
Range("BE11:BY11").Copy
Range("Be12:Be" & Lastrow).PasteSpecial Paste:=xlPasteAll,
operation:=xlNone, _
skipblanks:=False, Transpose:=False



All times are GMT +1. The time now is 03:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com