+ Reply to Thread
Results 1 to 7 of 7

non-contiguous named range - how to use in formulas, or how to convert to contiguous list

  1. #1
    Registered User
    Join Date
    10-22-2017
    Location
    ENGLAND
    MS-Off Ver
    2016
    Posts
    35

    non-contiguous named range - how to use in formulas, or how to convert to contiguous list

    I have a made non-contiguous named range i.e. a group of ranges under one name
    (I named the range from a filtered list and used "visiblecells" only)

    When I try to use the name in formulas it does not like it one bit, because it is a non-contiguous range.

    So I have to paste the range into a sheet and make a new name from the pasted list - this works but is slow and messy.

    Is there a better way?

    Any ideas?

    Many thanks.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: non-contiguous named range - how to use in formulas, or how to convert to contiguous l

    Attach a sample workbook (not a picture or pasted copy). 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.

  3. #3
    Registered User
    Join Date
    10-22-2017
    Location
    ENGLAND
    MS-Off Ver
    2016
    Posts
    35

    Re: non-contiguous named range - how to use in formulas, or how to convert to contiguous l

    Thank you for the reply,

    I have attached a simple file to demonstrate what I am trying to do.
    the actual file is very complex.

    The formula in cell G1 uses a named range that is generated from the list when the command button is pressed.
    If the list is filtered, the formula has an error message,
    when the list is not filtered, then the formula works.

    Is there any way to change the name to a contiguous name to allow the formula to work?

    Many thanks.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: non-contiguous named range - how to use in formulas, or how to convert to contiguous l

    Why not just use
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: non-contiguous named range - how to use in formulas, or how to convert to contiguous l

    You could use code to add a filter to col B and then count the visible cells.

    EDIT: If the named range is not otherwise essential, Fluff's is a much better suggestion.
    Last edited by shg; 06-22-2019 at 01:14 PM.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    10-22-2017
    Location
    ENGLAND
    MS-Off Ver
    2016
    Posts
    35
    Quote Originally Posted by Fluff13 View Post
    Why not just use
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks for the reply.
    The actual spreadsheet is complex and I need to use the name. The example I gave was just to illustrate.
    I have converted the non contiguous name into a contiguous one by pasting the values then creating a new name from the pasted values, this works well, however it takes 2 seconds.
    Last edited by david killoran; 06-23-2019 at 03:28 AM.

  7. #7
    Registered User
    Join Date
    10-22-2017
    Location
    ENGLAND
    MS-Off Ver
    2016
    Posts
    35
    Quote Originally Posted by shg View Post
    You could use code to add a filter to col B and then count the visible cells.

    EDIT: If the named range is not otherwise essential, Fluff's is a much better suggestion.
    Thanks for the reply, however I need to use the named range. The example I gave was just to illustrate. But thanks fornthe good ideas :-)
    I have been able to convert the non contiguous name into a contiguous name by pasting it into a sheet and then renaming it. This works well but takes 2 seconds. I was wondering if there was a sleeker way of converting the name.

+ 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. Named range for non-contiguous ranges
    By vikas.trades25 in forum Excel General
    Replies: 3
    Last Post: 05-08-2019, 12:15 AM
  2. [SOLVED] VBA to convert a non-contiguous range to 2 decimal places
    By The_Snook in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2017, 11:21 AM
  3. [SOLVED] Using scripting dictionary to add contiguous group of items from non contiguous range
    By stnkynts in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2014, 06:12 PM
  4. copy one row of named range spanning non contiguous columns
    By Lucas12345678920 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2013, 09:59 PM
  5. [SOLVED] Creating a contiguous list from a non contiguous list of items
    By tonymq in forum Excel General
    Replies: 6
    Last Post: 11-26-2012, 09:33 AM
  6. Pivot table based on named (non-contiguous) range
    By kuraitori in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 12:29 PM
  7. Vlookup on Non Contiguous Named Range
    By sflemings in forum Excel General
    Replies: 6
    Last Post: 01-20-2010, 06:58 AM

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