Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 271
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formats in formulas Paul Excel Discussion (Misc queries) 3 November 25th 08 08:19 AM
Insert rows: Formats & formulas extended to additonal rows Twishlist Excel Worksheet Functions 0 October 22nd 07 04:23 AM
Macro to insert copy and insert formulas only to next blank row bob Excel Programming 0 June 30th 06 12:02 PM
Extend formats and formulas JRB Excel Discussion (Misc queries) 11 August 28th 05 08:21 PM
2 Conditional formats and insert comment - ajit Ajit Munj Excel Discussion (Misc queries) 7 June 4th 05 05:39 AM


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"