Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro for Insert/ Copied Cells
I need a macro that allows a user to Copy/paste a set of rows (named "Style")
whereever the cursor is. "Style" and is defined as Sheet1!$200:$203 So if my cursor is on row 10, it will Copy all of all rows 200-203 and insert them at row 10. thanks in advance for your help tami |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro for Insert/ Copied Cells
Tami, try the below macro..
Sub Mac() Range("style").Copy Selection End Sub If this post helps click Yes --------------- Jacob Skaria "Tami" wrote: I need a macro that allows a user to Copy/paste a set of rows (named "Style") whereever the cursor is. "Style" and is defined as Sheet1!$200:$203 So if my cursor is on row 10, it will Copy all of all rows 200-203 and insert them at row 10. thanks in advance for your help tami |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Macro for Insert/ Copied Cells
Hi,
If you want to Insert them then you need slightly different code that suggested in the previous post, which will overwrite the contents of the destination rows. Range("Styles").Copy Cells(ActiveCell.Row, 1).Insert If on the otherhand, you want to overwrite the current selection try Range("Styles").Copy Cells(ActiveCell.Row, 1) This handles the possiblity that the cursor is not in column A which will generate an error if you try to copy a whole row. -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Tami" wrote: I need a macro that allows a user to Copy/paste a set of rows (named "Style") whereever the cursor is. "Style" and is defined as Sheet1!$200:$203 So if my cursor is on row 10, it will Copy all of all rows 200-203 and insert them at row 10. thanks in advance for your help tami |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Insert copied cells not highlighted | Excel Discussion (Misc queries) | |||
Insert copied cells | Excel Worksheet Functions | |||
Insert Copied Cells? | Excel Discussion (Misc queries) | |||
Macro to insert copied cells | Excel Discussion (Misc queries) | |||
insert copied cells | Excel Discussion (Misc queries) |