Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
insert rotating formaula
i have a macro which inserts new rows accross 12 pages in the position the
user wants the new row to be inputted. what i need to to do is copy a formula from the row above into the new line (this will always be in col B) or to insert a formula (=Overview!C39) but where the c39 changes to whateve the new row number is have tried using variables set the range of each new cell but with no luck thanks in advance Sub INSERT_ROW() 'Confirm new line Dim sh As Worksheet X = InputBox("Please Enter The Line Number Where You Want To Enter New Staff") Application.ScreenUpdating = False 'Unprotect Sheet Dim n As Single For n = 1 To Sheets.Count Sheets(n).Unprotect Password:="lockout" Next n ' insert Row For Each sh In Worksheets(Array("Jan", "Feb", "March", "april", "may", "June", "July", "Aug", "Sep", "Oct", "Nov", "Dec", "Overview")) sh.Rows(X).INSERT Next sh 'Create Log Open "c:\LogFolder\sheet log.txt" For Append As #1 Print #1, Format(Now, "mm/dd/yy hh:nn") & " Holiday Monitor " & Application.UserName & " Inserted New Employee at line "; X Close #1 'reestablist passwords Dim k As Single For k = 1 To Sheets.Count Sheets(k).Protect Password:="lockout" Next k Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible to insert a picture using formulas? | Excel Worksheet Functions | |||
How do I insert a reference to lookup and insert a name | New Users to Excel | |||
insert a JPEG into EXCEL 2002 | Excel Discussion (Misc queries) | |||
insert picture | Excel Discussion (Misc queries) | |||
Challenging Charting | Charts and Charting in Excel |