Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Amending a formula | Excel Discussion (Misc queries) | |||
Amending date formats. | Excel Discussion (Misc queries) | |||
Amending an existing function | Excel Worksheet Functions | |||
Help amending code | Excel Discussion (Misc queries) | |||
Help with Amending this Code Please | Excel Worksheet Functions |