+ Reply to Thread
Results 1 to 2 of 2

Macro is missing code to copy formulas as well as values

Hybrid View

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    Virginia Beach, VA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Macro is missing code to copy formulas as well as values

    I just need to know how to add code the the following macro to make it copy and paste everything including the formulas. Right now it is not copying and pasting formulas. I appreciate the help!


    Sub InsertMaintenance()
        Dim x As Long
        
        x = InputBox(Prompt:="Enter row number where you want to insert", _
              Title:="INSERT Maintenance", Default:="Enter Row Number")
        
    
        ActiveSheet.Unprotect Password:="password"
    
    ' InsertMaintenance Macro
    ' Insert a new maintenance employee onto timesheet
    '
    
    '
        Sheets("Instructions").Select
        Rows("213:219").Select
        Selection.Copy
        Sheets("40").Select
        Rows(x).EntireRow.Insert Shift:=xlDown
        ActiveSheet.Protect Password:="password"
    End Sub

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro is missing code to copy formulas as well as values

    Maybe:

    Sub AlanaL()
    Dim x As Long
    Application.DisplayAlerts = False
    Application.ScreenUpdating = False
    x = InputBox(Prompt:="Enter row number where you want to insert", _
              Title:="INSERT Maintenance", Default:="Enter Row Number")
        
    
        ActiveSheet.Unprotect Password:="password"
     
    ' InsertMaintenance Macro
    ' Insert a new maintenance employee onto timesheet
    '
    
    '
        
    Sheets("Instructions").Rows("213:219").Copy
    Sheets("40").Rows(x).Resize(6).Insert xlDown
    
    
        ActiveSheet.Protect Password:="password"
    Application.DisplayAlerts = True
    Application.ScreenUpdating = True
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro Copy Paste values not formulas lines above 0
    By bast0504 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-06-2013, 01:30 PM
  2. [SOLVED] macro code to save file to new folder with values and not formulas
    By gokzee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2013, 10:51 PM
  3. macro to copy cells with formulas and paste them as values
    By sammi8796 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2012, 08:00 PM
  4. Macro to copy only values and not formulas or links to a master file
    By Kimston in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-05-2012, 12:00 PM
  5. Macro to Copy Paste Values and Formulas
    By thillis in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-19-2009, 11:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1