Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Amending a formula leerem Excel Discussion (Misc queries) 3 August 4th 08 01:48 PM
Amending date formats. Chiccada Excel Discussion (Misc queries) 4 June 26th 07 04:32 PM
Amending an existing function Paydog4 Excel Worksheet Functions 2 February 28th 06 03:52 AM
Help amending code Steve Excel Discussion (Misc queries) 4 August 17th 05 03:57 PM
Help with Amending this Code Please [email protected] Excel Worksheet Functions 4 February 1st 05 07:04 PM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"