+ Reply to Thread
Results 1 to 4 of 4

Creating a macro to create sequential named ranges based on the content of a column

  1. #1
    Registered User
    Join Date
    07-14-2016
    Location
    london
    MS-Off Ver
    2010
    Posts
    3

    Creating a macro to create sequential named ranges based on the content of a column

    Hi

    I am looking for some advise in how to write a macro to create a named range IE upsJnl1 and then when the journal reference changes which is located in column b, it then names the range for the next journal to upsjnl1


    in the attached image you can see there are two journals and the first named range upsjnl1 which is B1 to J10 and the second range is B11 to J20, there could be as many as 200 journals with the number of rows ranging from 2 - 100 lines and the upsjnlx reference needs to be unique for each journal and sequential

    thank you so much in advance
    in screenshot.JPG

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Creating a macro to create sequential named ranges based on the content of a column

    May I ask why you are trying to create 200 named ranges?
    What are you trying to accomplish?
    Also you said you wanted the macro to call the named ranges the SAME named range, which isnt possible.

    If you are looking for a unique range to do lookups, then you COULD just concatenate the Journal Label with the entity name, and do the lookup on that unique key. This would be much less overhead than the macro solution (which is definitely possible).



    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    07-14-2016
    Location
    london
    MS-Off Ver
    2010
    Posts
    3

    Re: Creating a macro to create sequential named ranges based on the content of a column

    Hi
    Sorry if my thread was not clear, I am not trying to create named ranges with the same name
    The named ranges need to be unique and they need to increment with the same prefix ie upsJNL1, upsJNL2, upsJNL3etc
    its to load into a oracle software package called FDM for loading multi journals and it has to be in a specific format

  4. #4
    Registered User
    Join Date
    07-14-2016
    Location
    london
    MS-Off Ver
    2010
    Posts
    3

    Re: Creating a macro to create sequential named ranges based on the content of a column

    Basically, I want to be able to store in a variable of the current range which changes as it goes down the
    spreadsheet, to be able to store the Start:finish cell reference to use as a named range formula,
    and save the named range with the content of the cell of the first row/column of the range.

    Be grateful for any assistance, I have tried to search to do this but cannot find any examples which match my issue

+ 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. [SOLVED] Summing row ranges based on non-sequential column criteria
    By TexasKersh in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-20-2014, 08:21 AM
  2. Creating a dynamic set of Named ranges, based on the row count.
    By sdingman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-23-2013, 11:32 AM
  3. Replies: 3
    Last Post: 08-20-2012, 08:56 PM
  4. macro to create named ranges based on a header row.
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-07-2012, 08:07 PM
  5. Macro for creating named ranges from relative referencing
    By parodytx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2008, 01:00 AM
  6. create a Named Range via VBA based on cell content
    By carsto in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2007, 04:44 PM

Tags for this Thread

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