+ Reply to Thread
Results 1 to 6 of 6

Index only visible filtered rows, but without ignoring blanks.

  1. #1
    Registered User
    Join Date
    08-31-2017
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    15

    Index only visible filtered rows, but without ignoring blanks.

    Hi, I have a 'dashboard' that lists names in a column.

    I have a row that INDEXES this column, horizontally, such that the column is automatically 'transposed'.

    The column, however, is controlled by multiple filters in adjacent columns.
    I would like the INDEXING row to ignore hidden cells after applying a filter.
    Secondly, in the original column, there are some necessary blanks, depending on the filter applied. I would like these blanks also replicated horizontally.

    I did find one formula online that ignored hidden rows (I've lost the link) but unfortunately it also ignore blanks.

    In summary, no matter how the column is arranged/filtered, I want that column transposed verbatim.

    My example file is attached.
    Attached Files Attached Files
    Last edited by byteroom; 08-27-2019 at 09:11 AM. Reason: solved

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Index only visible filtered rows, but without ignoring blanks.

    Hi,

    Array formula** in D30:

    =IFERROR(INDEX($E:$E,SMALL(IF(SUBTOTAL(3,OFFSET($D11,ROW(D11:D27)-MIN(ROW(D11:D27)),)),ROW(D11:D27)),COLUMNS($A:A))),"")

    and copied across.

    Note that this ignores filtered rows, though not hidden (you appear to mix your terminology above - I presume you mean to exclude only the former).

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    08-31-2017
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    15

    Re: Index only visible filtered rows, but without ignoring blanks.

    Thanks a bunch man, it works.

    My column actually runs infinitely, so should I replace D11:D27 with D11:D1048576, or is there a more efficient replacement?

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Index only visible filtered rows, but without ignoring blanks.

    Quote Originally Posted by byteroom View Post
    My column actually runs infinitely, so should I replace D11:D27 with D11:D1048576, or is there a more efficient replacement?
    No! If you reference up to the very last column in the worksheet, you'll suffer the consequences in terms of calculation speed.

    Either choose a suitably low, though sufficient, upper bound for the end row being referenced or, even better, makes your ranges dynamic, such that they automatically adjust as your data expands/contracts. I can show you how to do this if you wish.

    Regards

  5. #5
    Registered User
    Join Date
    08-31-2017
    Location
    Malaysia
    MS-Off Ver
    2016
    Posts
    15

    Re: Index only visible filtered rows, but without ignoring blanks.

    Just out of curiosity, do you mean by making a table/named reference & linking the formula to it?

    Anyway, I'm fine with setting a 1000 row limit to the array, it's more than enough for my purpose.

    Thank you.
    Last edited by byteroom; 08-24-2019 at 05:30 AM. Reason: typo

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Index only visible filtered rows, but without ignoring blanks.

    Quote Originally Posted by byteroom View Post
    Just out of curiosity, do you mean by making a table/named reference & linking the formula to it?
    Yes, sorry - formatting the source data as an Excel Table would work, and would require no further work on your part. If you prefer to use a non-structured table, you'll need to use Defined Names comprising formulas which auto-detect the last row containing data within that table. The latter requires a touch more work, which I am happy to show you if you wish.

    Regards

+ 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] SUMIF, ignoring blanks and find earliest date ignoring blanks
    By Chris_Devon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2019, 10:16 AM
  2. [SOLVED] Delete visible filtered rows
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2019, 02:04 PM
  3. Replies: 3
    Last Post: 07-11-2018, 12:13 PM
  4. Index/Match ignoring Blanks/Zeros for each instance
    By corhrtz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-18-2015, 11:04 AM
  5. [SOLVED] Data Cleanup - ignoring blanks, ignoring rows with string values etc.
    By Huyaku in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2015, 08:17 AM
  6. [SOLVED] Move data in rows ignoring blanks
    By mmartin79 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2012, 10:16 AM
  7. Macro to select till last cell visible(numbers in cells) (filtered) ignoring formulas
    By DiegoBoffa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2012, 11:10 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