+ Reply to Thread
Results 1 to 10 of 10

Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

  1. #1
    Registered User
    Join Date
    07-18-2017
    Location
    Rosharon, Texas
    MS-Off Ver
    2016
    Posts
    10

    Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    Usually I can figure this stuff out but I am currently at a loss. Here is what I have...

    On Sheet1: (No Name)
    I have 2 drop-downs for validated lists, Lets call the lists "Size" and "Class"
    I don't yet but would like to have a formula that retrieves a cross reference of 2 different named cell ranges based on what is selected in the two previously mentioned drop-downs

    On Sheet2 (TABLE)
    I have a fairly sizable table where there are many named cell ranges. Some are an array, and some are specific cells in a column.
    For example:
    There is one named cell range that is F6:Y14 - Named "ONEFIFTY"
    There is another named cell range that is Q8:Q14 - Named "SIXINCH"

    I would like the values of Q8:Q14 to be returned on Sheet1 if "Size" list equals 6IN AND "Class" list equals Class 150.
    Visual Aids attached.

    Please Help!!
    Sheet1.png
    TABLE.png

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    07-18-2017
    Location
    Rosharon, Texas
    MS-Off Ver
    2016
    Posts
    10

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    My apologies... new to forum. I have attached the file as per the instructions above.
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    DESSTRO welcome to the forum.

    Whew! That's a lot of non-contiguous named ranges. It took me a while to figure it out.

    There is one named cell range that is F6:Y14 - Named "ONEFIFTY" In cell B11
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    There is another named cell range that is Q8:Q14 - Named "SIXINCH" In cell D11
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Those two return the ranges in question.

    In B13 and filled down until you get blanks
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    ... that will return ONEFIFTY/6IN if both arrays are the same.

    =INDEX(SIXINCH,,,MATCH(D4,VALUES!$D$2:$D$8,0)) may need some explanation. If you are not aware of it there is a seldom used 4th argument in INDEX. Since SIXINCH is a non-contiguous range ... each sub range comma separated, numbered left to right 1 through n ... this finds that sub range or area_num by matching D4 to the data validation list.
    Dave

  5. #5
    Registered User
    Join Date
    07-18-2017
    Location
    Rosharon, Texas
    MS-Off Ver
    2016
    Posts
    10

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    FlameRetired...you're a genius! That's perfect. It is exactly what I was asking for.
    Now, How can I get that to replicate throughout the entire table, i.e., how do I get values for any class and any size? If I choose 4IN Class 900 or 1IN Class 600?

    Would this be better done in VBA? Basically I want to be able to do exactly what you have set up for me but between any combination of named cell ranges...Class ranges vs. Size ranges. Not sure if I am making any sense, please let me know if further explanation is required.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    Now, How can I get that to replicate throughout the entire table, i.e., how do I get values for any class and any size? If I choose 4IN Class 900 or 1IN Class 600?
    If you put these non contiguous range names in another drop down I might be able to do something about that. I believe it will require INDIRECT to reference those items in the drop down. It's been years since I've done that, but set it up and I will see what I can do.


    EIGHTEENINCH
    EIGHTINCH
    FIVEINCH
    FOURINCH
    FOURTEENINCH
    HALFINCH
    ONEANDONEHALFINCH
    ONEANDONEQUARTERINCH
    ONEINCH
    SIXINCH
    SIXTEENINCH
    TENINCH
    THREEANDONEHALFINCH
    THREEINCH
    THREEQUARTERINCH
    TWELVEINCH
    TWENTYFOURINCH
    TWENTYINCH
    TWOANDONEHALFINCH
    TWOINCH

    Edit You are also going to need a separate drop down for the single range references (ONEFIFTY, etc.)
    Last edited by FlameRetired; 07-20-2017 at 01:10 AM.

  7. #7
    Registered User
    Join Date
    07-18-2017
    Location
    Rosharon, Texas
    MS-Off Ver
    2016
    Posts
    10

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    FlameRetired - Thanks for your help! I really appreciate it!!
    I have added the 2 new dropdowns with the names of the ranges. One thing to note is that I did change the names of the ranges slightly by adding underscore between each word in order to make it easier on the eyes in the dropdowns.

    I have re-attached the file here.

    I have to ask, FlameRetired - is that name to indicate a retired firefighter?
    Attached Files Attached Files

  8. #8
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    Thanks for the underscores and yes I am a retired FireFighter. Thanks for asking.

    I am breaking discipline and not posting the formula here. It's 6 lines long and without context there would be no point. It is in B8:B15 of 'Sheet1'.

    You might consider another named range to clear up some formula clutter.
    The non contiguous range
    (ONE_FIFTY,THREE_HUNDRED,FOUR_HUNDRED,SIX_HUNDRED,NINE_HUNDRED,FIFTEEN_HUNDRED,TWENTYFIVE_HUNDRED)
    could be replaced with that name.

  9. #9
    Registered User
    Join Date
    07-18-2017
    Location
    Rosharon, Texas
    MS-Off Ver
    2016
    Posts
    10

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    NICE!! Consider this one solved FlameRetired!! Which BTW is an amazingly awesome handle for a retired firefighter!! You may be retired but you certainly put the wet stuff on the red stuff or me here!!

    Just fyi, I did make a slight adjustment, I cleared out the data validation on the 2 newest drop downs, and formulated those cells to auto pop what was needed in there in order to return the values I was try to mine.
    Example in Cell H4 on sheet1...
    Please Login or Register  to view this content.
    And a similar formula for F4 on Sheet1. Now I can just hide those columns and use solely the dropdowns in B4 and D4.

    Again this is perfect and I really really appreciate the help!!

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Use 2 Different Named Cell Ranges To Return Values From 1 Of the Ranges In Formula

    Glad to hear it! Thank you for the kind comment, the rep and marking this thread SOLVED.

+ 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] Dynamic Named Ranges using other cell values
    By hamidxa in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-26-2016, 04:34 PM
  2. 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
  3. Reference Named Ranges in a formula based on a cell
    By AiriA in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-29-2012, 05:28 PM
  4. Replies: 0
    Last Post: 10-15-2012, 07:24 AM
  5. Find/Replace Cell Values with Named Ranges
    By enk529 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2010, 06:07 PM
  6. Named ranges by cell values?
    By mikeyfear in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2008, 01:57 PM
  7. 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

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