![]() |
Insert Formulas and Formats
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 |
Insert Formulas and Formats
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 |
Insert Formulas and Formats
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 |
All times are GMT +1. The time now is 05:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com