LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rich Mcc
 
Posts: n/a
Default 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
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
Is it possible to insert a picture using formulas? phil2401 Excel Worksheet Functions 4 December 15th 05 08:12 PM
How do I insert a reference to lookup and insert a name Jan K New Users to Excel 3 July 20th 05 10:39 AM
insert a JPEG into EXCEL 2002 mckee Excel Discussion (Misc queries) 3 March 11th 05 05:03 PM
insert picture BillGwyer Excel Discussion (Misc queries) 1 March 4th 05 06:37 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM


All times are GMT +1. The time now is 03:23 PM.

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

About Us

"It's about Microsoft Excel"