Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is my code:
Selection.EntireRow.Select Selection.Copy Selection.Insert Shift:=xlDown I am wanting it to copy a row and insert the copied row pusing the other rows down. I want the new row to have all the formats and formulas of the copied row. ??? -- Thanks Shawn |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My code inserts the new row where I want. The copied row has several cells
with formulas in it. When the pasted row is created, it doesn't have the formulas in it. I am needing like a paste all or something? -- Thanks Shawn "OssieMac" wrote: Hi Shawn, Not really sure I understand exactly what you want to do. The code you have copies the row and inserts it directly above the copied row. Do you want to be able to nominate the row to be copied then nominate the position to insert. If so try the following. Range("A12").EntireRow.Copy Range("A20").Insert Shift:=xlDown The inserted row becomes row 20 using the above code. -- Regards, OssieMac "Shawn" wrote: Here is my code: Selection.EntireRow.Select Selection.Copy Selection.Insert Shift:=xlDown I am wanting it to copy a row and insert the copied row pusing the other rows down. I want the new row to have all the formats and formulas of the copied row. ??? -- Thanks Shawn |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the formulas only refer to cells to the right or left of them then they
will copy. Otherwise they do not work. Can even cause circular references. -- Regards, OssieMac "Shawn" wrote: My code inserts the new row where I want. The copied row has several cells with formulas in it. When the pasted row is created, it doesn't have the formulas in it. I am needing like a paste all or something? -- Thanks Shawn "OssieMac" wrote: Hi Shawn, Not really sure I understand exactly what you want to do. The code you have copies the row and inserts it directly above the copied row. Do you want to be able to nominate the row to be copied then nominate the position to insert. If so try the following. Range("A12").EntireRow.Copy Range("A20").Insert Shift:=xlDown The inserted row becomes row 20 using the above code. -- Regards, OssieMac "Shawn" wrote: Here is my code: Selection.EntireRow.Select Selection.Copy Selection.Insert Shift:=xlDown I am wanting it to copy a row and insert the copied row pusing the other rows down. I want the new row to have all the formats and formulas of the copied row. ??? -- Thanks Shawn |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formats in formulas | Excel Discussion (Misc queries) | |||
Insert rows: Formats & formulas extended to additonal rows | Excel Worksheet Functions | |||
Macro to insert copy and insert formulas only to next blank row | Excel Programming | |||
Extend formats and formulas | Excel Discussion (Misc queries) | |||
2 Conditional formats and insert comment - ajit | Excel Discussion (Misc queries) |