+ Reply to Thread
Results 1 to 9 of 9

Pull data from various Named Ranges

  1. #1
    Registered User
    Join Date
    06-04-2014
    Posts
    13

    Question Pull data from various Named Ranges

    I would like the ability to pull information from various named ranges (each named range depends on the selected customer from a drop down list). Each customer has a list of rooms our company cleans, some customers have the same room names as others, but each list of rooms has it's own unique named range.

    Example:
    Customer 1: Customer_1
    Customer 2: Customer_2

    I can display the named range in a cell as I have a table with that information and depending on the customer I select I can display the named range in a cell. I would like to use this in a formula to grab the room numbers from that named range without having to use VBA if at all possible.

    Each named range is in a row, and the same column

    Example:
    Customer_1
    Room1
    Room2
    Room3

    Customer_2
    AB1
    AB2
    AB3

    I have a worksheet that we record each room that has been cleaned for the season, but no easy task of figuring out which rooms have not yet been cleaned without comparing it with the rooms they have. Some customers have over 100 rooms and it's no easy task to compare this information. I want to be able to automate this the best I can.

    When customer has been selected I have drop down lists using formula =INDIRECT(A1) for example and A1 has the named range for the customer (ex: Customer_1) and I can select the room numbers for that customer, but don't know how to list out every room in multiple cells.

    If anyone could help with this I would appreciate it.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Pull data from various Named Ranges

    Hi,

    I can't help thinking that you'd be better served by creating a proper database and using that to analyse your data with say a Pivot Table. e.g. create a database with the following column labels

    Customer
    Room Number
    Cleaned (where the values would be either Yes or No/blank

    Then add a row for every permutation of customers and rooms and mark the database when the rooms are cleaned. Since this is needed every season you need to decide whether you want to add a fourth column to record the date/season or just clear the Yes/Cleaned and start afresh every season.

    Then just apply a Pivot Table and put the 'Cleaned' field in the PT Report Filter pane so that you can select the blanks/No when you want to list the uncleaned rooms.

    This would be a far more elegant and useful approach than what you are attempting to do at the moment.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Pull data from various Named Ranges

    Put this formula in B9 and fill down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by mehmetcik; 07-20-2015 at 05:52 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull data from various Named Ranges

    Select the range B9:B13 and enter this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    On the Database worksheet enter the room numbers in H2:H6
    Enter this formula in G2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    In I2 enter this formula and fill down to give the remaining rooms to be cleaned:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Select I2:I6 and name Clean

    Select Selection!F9:F13 and enter this formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Array Enter (Ctrl + Shift + Enter)
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull data from various Named Ranges

    I didn't notice the two numbering systems for the rooms. Will get back to you.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull data from various Named Ranges

    Ok, extensive changes to the formulae to take care of the rooms to be cleaned.

    On the Selection worksheet select the Rooms # B9:B13 and name the range Rooms

    On the Database worksheet select H2:H6 and ARRAY enter this formula which will change the room #s according to the customer:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In Selection ARRAY enter in I2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In Selection ARRAY enter in J2 and fill down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Name J2:J6 Clean (re define the name in the Name Manager)
    Attached Files Attached Files

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull data from various Named Ranges

    I had trouble with the previous message so ended it ASAP.
    When you change customer, the selections for the rooms to be cleaned are not automatically changed you have to delete the existing entries and make new choices from the drop down lists.

    The room numbers will change automatically and the Room Left to be Cleaned will fill with all the rooms for that customer until you delete the Rooms Cleaned data and make new entries. As you make entries in the Rooms Cleaned, that entry is eliminated from the Rooms Left to be Cleaned.

    I hope that makes sense....it has been a long day

  8. #8
    Registered User
    Join Date
    06-04-2014
    Posts
    13

    Re: Pull data from various Named Ranges

    thanks newdoverman, that worked great!

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Pull data from various Named Ranges

    You're welcome. Thank you for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Need to pull address ranges with accompanying data for large data base
    By pick44 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 03-09-2015, 11:12 AM
  2. 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
  3. Creating links to pull data from named cells saved on SharePoint
    By phpolicylady in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-26-2013, 12:46 PM
  4. Named ranges with ODBC data
    By jschell in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-18-2009, 03:45 PM
  5. Data drop down with named ranges
    By excellentexcel in forum Excel General
    Replies: 1
    Last Post: 01-18-2009, 07:54 AM
  6. Copy data in named ranges to a newer version of the same template to identical ranges
    By handstand in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-21-2006, 10:51 AM
  7. [SOLVED] PULL function (Harlan Grove) - can it use Named Ranges?
    By [email protected] in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2006, 02:15 PM

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