+ Reply to Thread
Results 1 to 8 of 8

Create a Named Range of non-blank values in a range

  1. #1
    Registered User
    Join Date
    03-07-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/2010, Outlook 2007/2010
    Posts
    60

    Create a Named Range of non-blank values in a range

    Suppose I have a range of Spencer;Zach;Jenny;;Ross;;Nolan;;;Josh. I want to operate on this as Spencer;Zach;Jenny;Ross;Nolan;Josh. In Google Sheets I would do this with =FILTER(A1: A10,NOT(ISBLANK(A1:A10)) and it would return exactly what I need, then set the Named Range to a range around this formula. Excel does not have a FILTER formula or a SORT formula. I cannot filter the original data. I need an operable Named Range with the same data as the original range but without blanks.

    CP: https://www.mrexcel.com/forum/excel-...umproduct.html
    Last edited by Dralky; 07-09-2018 at 03:12 PM. Reason: Added cross-post

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Create a Named Range of non-blank values in a range

    Don't think that there is a way to filter directly into a named range, can be done within a worksheet formula using something like

    =INDEX($A$1:$A$10,SMALL(IF($A$1:$A$10<>"",ROW($A$1:$A$10)),ROWS($A$1:$A1)))

    Array confirmed with shift ctrl enter, then filled down as needed.

  3. #3
    Registered User
    Join Date
    03-07-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/2010, Outlook 2007/2010
    Posts
    60

    Re: Create a Named Range of non-blank values in a range

    When I paste this using CTRL+SHIFT+ENTER it only returns the first one. How can I get all of the correct returns?

  4. #4
    Registered User
    Join Date
    03-07-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/2010, Outlook 2007/2010
    Posts
    60

    Re: Create a Named Range of non-blank values in a range

    Another hickup. We need this to run on a range of 30 rows and 3 columns. No matter what the setup, in the end we need a Named Range which only uses the non-blank values from 3 columns.

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Create a Named Range of non-blank values in a range

    Why do you specifically need a named range? What is the intention for this range once created?

    When you enter the formula from my last post, use the fill handle to drag it down, each cell you fill with the formula as you drag down will show the next non blank cell.

  6. #6
    Registered User
    Join Date
    03-07-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007/2010, Outlook 2007/2010
    Posts
    60

    Re: Create a Named Range of non-blank values in a range

    So I can use =SUMPRODUCT(--(D2=NamedRange)) to check if a given name falls within a dynamic range.

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Create a Named Range of non-blank values in a range

    I don't understand the need to take such a convoluted approach.

    Unless D2 is blank, which would mean no match to the filtered range, there is no need to filter the the blanks out.

    With any criteria in D2, a formula will find a match in A1:C10 with blanks, or filtered out to ignore blanks.

    From the information you have given us so far, what you are trying to do serves no practical reason, there is a way to get the end result without it.

    If you're trying to shrink the range to reduce calculation, then your efforts are futile, filtering the blanks will take more effort than processing them with an efficient formula.
    Last edited by jason.b75; 06-29-2018 at 07:49 PM.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,777

    Re: Create a Named Range of non-blank values in a range

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    If you have less than 10 posts, do not try to copy and paste the link. Instead, type the link out in your thread.

    No further help to be offered, please, until the OP has complied with this request.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Create a Named Range of non-blank values in a range
    By Dralky in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-30-2018, 08:23 AM
  2. [SOLVED] Compare cells to named range and create new sheets using related named range
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-10-2015, 03:35 PM
  3. Loop through each folder copy values from range in file1 to named range in file2
    By dafella in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2015, 05:19 PM
  4. [SOLVED] Dynamic Named Range Help - Range Based on Values in Column
    By Filibuster in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-03-2012, 11:13 AM
  5. Non blank named range from named range with blanks
    By goels in forum Excel General
    Replies: 3
    Last Post: 10-24-2011, 12:54 PM
  6. Need to create named range but with variable range
    By bhodge10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-07-2011, 02:15 PM
  7. Replies: 3
    Last Post: 06-04-2011, 10:56 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