Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Question
Hi there,
Can someone please help me with macro programming to do the following? (Im going nuts) Here is what I have.... (4) sheets within a worksheet, sheet1 = master sheet sheet2-4 = copies of master but with certain cells turned off for various users. Function: I would like to insert a new row in the master sheet at any givin row location....then input data across that row at various cells. Then I would select the entire row with new data....run a MACRO that would duplicate it on the other sheets at the exact same location. In other words...all Four(4) sheets should be Identical in formatting and row sequence. I have done this with copyinbg a set row to a set row, but I do not know how to write macro to pick user defined row to be duplicated. Any help would be greatly appreciated. Thank you in advance. Dizzy --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Question
This is run from the line you want to insert. First macro
insert the line and quits, then you put in the data to carry to the other three sheets. While on the line you want to duplicate you run the second macro. Pretty simple, but it works. Assumes the sheets are named Sheet, Sheet2, etc. Sub LineForData() ActiveCell.Rows("1:1").EntireRow.Select Selection.Insert Shift:=xlDown ActiveCell.Select End Sub Sub InsertLine() For x = 1 To 3 InsertRow = ActiveCell.Row ActiveCell.EntireRow.Select Selection.Copy Sheets("Sheet" & (x + 1)).Select Rows((InsertRow) & ":" & (InsertRow)).EntireRow.Select Selection.Insert Shift:=xlDown ActiveSheet.Paste Next Sheets("Sheet1").Select End Sub -----Original Message----- Hi there, Can someone please help me with macro programming to do the following? (Im going nuts) Here is what I have.... (4) sheets within a worksheet, sheet1 = master sheet sheet2-4 = copies of master but with certain cells turned off for various users. Function: I would like to insert a new row in the master sheet at any givin row location....then input data across that row at various cells. Then I would select the entire row with new data....run a MACRO that would duplicate it on the other sheets at the exact same location. In other words...all Four(4) sheets should be Identical in formatting and row sequence. I have done this with copyinbg a set row to a set row, but I do not know how to write macro to pick user defined row to be duplicated. Any help would be greatly appreciated. Thank you in advance. Dizzy --- Message posted from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro Question
-----Original Message----- Hi there, Can someone please help me with macro programming to do the following? (Im going nuts) Here is what I have.... (4) sheets within a worksheet, sheet1 = master sheet sheet2-4 = copies of master but with certain cells turned off for various users. Function: I would like to insert a new row in the master sheet at any givin row location....then input data across that row at various cells. Then I would select the entire row with new data....run a MACRO that would duplicate it on the other sheets at the exact same location. In other words...all Four(4) sheets should be Identical in formatting and row sequence. I have done this with copyinbg a set row to a set row, but I do not know how to write macro to pick user defined row to be duplicated. Any help would be greatly appreciated. Thank you in advance. Dizzy --- Message posted from http://www.ExcelForum.com/ . Dizzy - You can do this without code by grouping your sheets (clicking on the first and last sheet tabs), insert your row where needed (highlight your row and press ctrl and the + sign) insert your data in the cells of the top sheet and it will be automatically entered for you in the other sheets. Then right click on the sheet tab to ungroup the sheets. REMEMBER when in group mode ALL changes made are reflected throughout the group sheets. Grouping is a very powerful tool but must be used with care Good luck - Keith |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro question | Excel Worksheet Functions | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
Macro Question | Excel Worksheet Functions | |||
MACRO QUESTION | Excel Discussion (Misc queries) | |||
question on macro | Excel Discussion (Misc queries) |