Amending another formula

L

leerem

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
 
M

Mike H

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
 
L

leerem

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
 
M

Mike H

Hi,

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

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top