ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select ranges of cells relative to location and then paste (https://www.excelbanter.com/excel-programming/302129-select-ranges-cells-relative-location-then-paste.html)

Buffyslay

select ranges of cells relative to location and then paste
 
hi again

i have an active cell i have selected. *using activeCell

what i now want to do is copy whats in that cell into the
next 11 cells down
miss 3
copy into next 30
miss 2
copy into next 7

its a pain in the you know where..

any help gratefully received...

many thanks

Tom Ogilvy

select ranges of cells relative to location and then paste
 
ActiveCell.Offset(1,0).Range( _
"A1:A11,A15:A44,A47:A53").Value = ActiveCell.Value

Note that this has nothing to do with column A. This represents positions
relative to the activecell, so it is applicable anywhere on the spreadsheet
where you have enough rows below the activecell.

--
Regards,
Tom Ogilvy

"Buffyslay" wrote in message
om...
hi again

i have an active cell i have selected. *using activeCell

what i now want to do is copy whats in that cell into the
next 11 cells down
miss 3
copy into next 30
miss 2
copy into next 7

its a pain in the you know where..

any help gratefully received...

many thank




[email protected]

select ranges of cells relative to location and then paste
 
well aren't you just the best!

i had to change ActiveCell.Offset(1,0).Range( _
"A1:A11,A15:A44,A47:A53").Value = ActiveCell.Value

to
ActiveCell.Offset(1,0).Range( _
"A1:A11,A15:A44,A47:A53").Value = ActiveCell.Formula

but - big wows anyway.
Why does this work this way then? with the 'a' i mean?

__________________________________________________ ____
Willow: "I knew it! I knew it! Well, not in the sense of having the
slightest idea, but I knew there was something I didn't know."

http://www.buffyslay.co.uk

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Tom Ogilvy

select ranges of cells relative to location and then paste
 
from a single reference cell

A1 is the reference cell
A2 is the cell below the reference cell

so treats the reference cell as if it were the upper left corner of the
worksheet.

--
Regards,
Tom Ogilvy

wrote in message
...
well aren't you just the best!

i had to change ActiveCell.Offset(1,0).Range( _
"A1:A11,A15:A44,A47:A53").Value = ActiveCell.Value

to
ActiveCell.Offset(1,0).Range( _
"A1:A11,A15:A44,A47:A53").Value = ActiveCell.Formula

but - big wows anyway.
Why does this work this way then? with the 'a' i mean?

__________________________________________________ ____
Willow: "I knew it! I knew it! Well, not in the sense of having the
slightest idea, but I knew there was something I didn't know."

http://www.buffyslay.co.uk

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 09:48 AM.

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