Results 1 to 2 of 2

Copy Named range to New Row

Threaded View

  1. #1
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    324

    Copy Named range to New Row

    I have a Named range called Data.

    The second row of "Data" contains a named Range "BaseRow"

    The user to click on the first cell in the last row of "Data".

    The user will then run the Macro

    The Macro will

    Insert a new Row below the active cell.
    Copy "BaseRow" and then paste it to the first cell of the new row.

    This is what I have so far but it errors.


    Sub InsertCopyRow()
    
    'Insert a Row and Copy Named range onto New Row
        
       Selection.Cells(1).Offset(1).EntireRow.Insert Shift:=xlUp, CopyOrigin:=xlFormatFromLeftOrAbove
       Range("BaseRow").Select
      Selection.Copy
       
       Selection.Range.Paste
       Selection.Range.Offset (1)
        Selection.Offset(1).Select
        
    End Sub

    Any ideas?

    Thanks

    Allister
    Attached Files Attached Files
    Last edited by AllisterB; 04-18-2021 at 07:01 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] copy value to named range
    By ccsmith in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-23-2018, 03:04 AM
  2. [SOLVED] Copy named range "headerrows" to each worksheet as created by named range "classes"
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-25-2017, 05:23 AM
  3. Adjust existing macro to pick up specific named worksheet and copy to named range
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-08-2017, 12:03 PM
  4. Copy values of all named range in wb1 to identically named ranges in wb2
    By JAMIAM in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-24-2016, 06:58 PM
  5. Loop through each folder copy values from range in file1 to named range in file2
    By dafella in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2015, 05:19 PM
  6. Copy all bar one elements of a named range to a new named range
    By SeanGorman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2011, 04:30 PM
  7. Replies: 3
    Last Post: 06-04-2011, 10:56 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