+ Reply to Thread
Results 1 to 5 of 5

Add named ranges via loop

  1. #1
    Registered User
    Join Date
    05-10-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    10

    Add named ranges via loop

    Hi All,

    I tried adding named ranges from one workbook to another using the Microsoft guidance: https://support.microsoft.com/en-us/kb/213389, the only problem is that it causes an error on the main command that that does all the work, and so this doesn't help me understand where it is actually failing! Instead I was thinking of obtaining all the named ranges from the workbook and then writing a new macro to add them into the workbook I want them in, that way if it encounters an error, I will know which one failed! Here's what I am attempting so far:

    Please Login or Register  to view this content.
    But it fails on the crucial last step. The idea is to look into a new tab in my target workbook and cycle through the list of named ranges which has the name in column 1, the sheet in column 3 and the cell reference in column 4. I've only set it up for 2 attempts at the moment but I have a long list of named ranges.

    Can anyone advise if this is a good method to go about the problem, and if so where the error is? Or if there is a better way of achieving the same outcome.

    Thank you in advance,

    Tom!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Add named ranges via loop

    Please post your sample workbook.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    05-10-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Add named ranges via loop

    Apologies for the omittance - see attached!

    Tom
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Add named ranges via loop

    Please Login or Register  to view this content.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Add named ranges via loop

    Thanks for the rep.

+ 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. Loop Defining Named Ranges
    By lopiner in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-20-2017, 02:57 PM
  2. [SOLVED] Loop through columns and named ranges
    By amphinomos in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 06-02-2015, 12:14 PM
  3. Define only 2 named ranges from a list of named ranges...
    By abhi900 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2014, 04:20 AM
  4. Replies: 2
    Last Post: 10-18-2013, 01:56 PM
  5. VBA to create specific named ranges and repeating process (Loop?) across columns
    By vinothj86 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-30-2012, 05:01 AM
  6. Multiple Named Ranges Pasting Loop issue
    By pacman_d in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-13-2010, 09:46 PM
  7. named ranges in a For Loop
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-22-2005, 11:10 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