Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Copying & Inserting Rows w/o Affecting other Rows Etc.
I have a spreadsheet that a user can click on an option button and copy and
insert rows. Problem is that when this happens it moves all the other data down another row or two depending on how many times they insert rows. This affects other macros that have the same capability to copy and insert rows in other areas of the spreadsheet. I can not figure out how to add additional rows and maintain the rest of the sheets format throughout the spreadsheet. This is the code I have to copy and insert row on one section Example: User wants another Email Request line they click on the option button to insert the copied cells. Sub PIMUserRequest() ' Range("A16:V16").Select Selection.Copy Rows("17:17").Select Range("C17").Activate Selection.Insert Shift:=xlDown Rows("17:17").RowHeight = 15.75 End Sub Please HELP Linda |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Copying & Inserting Rows w/o Affecting other Rows Etc.
If you insert a row or rows, the rows below have to go somewhere.
You can insert cells and shift down just for the column without affecting adjacent columns or rest of row but cells below the inserted cell have to move down in that column. Gord Dibben MS Excel MVP On Tue, 21 Oct 2008 13:50:00 -0700, LRay67 wrote: I have a spreadsheet that a user can click on an option button and copy and insert rows. Problem is that when this happens it moves all the other data down another row or two depending on how many times they insert rows. This affects other macros that have the same capability to copy and insert rows in other areas of the spreadsheet. I can not figure out how to add additional rows and maintain the rest of the sheets format throughout the spreadsheet. This is the code I have to copy and insert row on one section Example: User wants another Email Request line they click on the option button to insert the copied cells. Sub PIMUserRequest() ' Range("A16:V16").Select Selection.Copy Rows("17:17").Select Range("C17").Activate Selection.Insert Shift:=xlDown Rows("17:17").RowHeight = 15.75 End Sub Please HELP Linda |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copying formulas when inserting new rows | Excel Discussion (Misc queries) | |||
Inserting multiple rows and copying formulas | Excel Discussion (Misc queries) | |||
need help please inserting multiple rows based on cell value then copying to data sheet | Excel Worksheet Functions | |||
sort multiple rows without affecting others rows | Excel Discussion (Misc queries) | |||
Automatically copying fomulae when Inserting rows | Excel Discussion (Misc queries) |