+ Reply to Thread
Results 1 to 23 of 23

FILTER Function - How to condense a worksheet after filtering

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    FILTER Function - How to condense a worksheet after filtering

    Hello,
    I have 3 different data sets/tables on the same worksheet that are being dynamically filtered using the FILTER function that allows you to search and filter by ANY field/word. However, once I filter the results then I'd like to have the data sets shift/move up so that there aren't huge gaps between each data set after they've been filtered. Because otherewise you have to scroll down quite a bit until you reach the next filtered data set. For example, using the example file that's attached if I wanted to insert the word "Goods" into the filter, it will filter all 3 data sets but I'm also needing the data sets to condense/move-up so that there aren't huge blank gaps between each data set.
    Condensing Filtered Data Sets.xlsx
    Last edited by dash11; 01-02-2024 at 01:42 PM. Reason: Adding Example File

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    Please read the yellow banner (top) and post a SMALL sample file (10-20 rows) showing what you want.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    Thanks Glenn, i've atached a sample file

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    Before tackling your actual problem... please see if this replaces your monster formula...


    =IFERROR(FILTER(FTPRate,BYROW(--ISNUMBER(SEARCH($H$3,FTPRate)),LAMBDA(x,SUM(x)))>0),"No results")
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    10-19-2021
    Location
    Brazil
    MS-Off Ver
    Office 365 V2401 w/ Win10 Home 64 Bit
    Posts
    2,014

    Re: FILTER Function - How to condense a worksheet after filtering

    It seems to me that this is what you really want.

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

  6. #6
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    I updated the formula is your formula is definitely WAY better. So I'm essentially looking for a way to show all three breakouts (FTP, Coupon, Spread) in a condensed view whenever the search results remove a large number of rows and create a wide gap between the three breakout sections. For example,typing in "Mortgage" will only render 7 results, which you then have to scroll down to see the same 7 results in the next breakout section. FYI, the file I'm actually using is MUCH larger and so the need to have a better solution is only magnified.

    Condensing Filtered Data SetsV2.xlsx

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    I sort-of wonder why you want every field to be searchable.. if the raw data is any cell is 1234.56, it is rounded to 1235. That is what you SEE. If you search for what you SEE, it will search for 1235 and NOT find 1234.56. Is that really of any use?? This is the point DJunqueira was making...

    Modified, as specified.

    EVERYTHING from row 10 downwards MUST be deleted.

    It now does what you asked for.

    One issue remains. There is (always was) a total row at row 8. Do you need a substotal row for each dataset? Is it OK to have it on rows 10, 20 and 30 (when mortgage is selected)? If not, where?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    Thanks Glenn this is really helpful and almost exactly the results that i was looking for, with one exception. The column headers and totals are pretty important to retain for each of the breakout sessions. All of the ratios in the row above the column headers are applicable to each breakout. By only retaining the very top row of headers and ratios, it's incorrectly aggregating everything in each given column and is over inflating all numbers and ratios. Is there a way to retain each of the header and ratio rows for each section and have them move up as well each time the data gets filtered?

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    My take on what you have asked for... See file. The summary data for the first two columns have been done for all 3 datasets. I have hit a snag. The formulae in AA to AF have stopped working, so I have no way of checking if the calculation is correct. Can you restore them using ranges appropriate for the FIRST dataset when MORTGAGE is selected. Eventually row 8 will be deleted.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    Thanks Glenn, I've restored the data in columns AC:AF

    Condensing Filtered Data SetsV3.xlsx
    Last edited by dash11; 01-03-2024 at 03:54 PM.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    More issues, some arising from earlier unanswered issues

    1. The seach term in D5. Can it be ONLY those terms like "Mortgage", Money market", etc. as opposed to searching for amounts?

    2. Those summary formulae are a bit of a headache. I CAN do them, but it is NOT going to be easy, or quick!!

    3. I'm tempted to start over again, but need an answer to Q1...

  12. #12
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    I think my efforts to mask data and condense the file may have complicated things so I took the file back to it's original state and then I masked any sensitive data. To answer your questions:

    1. No, the search terms (Column B) will constantly vary and so coding should be dynamic relative to the constant changes. However to your point that you made earlier about not being able to accurately search for numbers since there's decimals and rounding that makes that nearly impossible, I think keeping the search to just column B would suffice if that makes things any easier. B

    Condensing Filtered Data SetsV4.xlsx

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    One the verge of giving up.

    You seem to have gone back to square -20. Everthing I have done so far is in the bin.

    Take a look at the ANSWERS generated by your formulae in columns Z to AE and explain HOW they were derived.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    The calculations for the values in columns Z:AE are all being derived in the PopulationAtt tab and Z:AE is just pulling those values in. The ratios in row 7 are derived by subtracting the sumproducts for columns Z:AE. Everything you've done so far is excellent but in the end I was just hoping that the blank rows that exist "post-filtering" could be removed/hidden so that the "Coupon" and "Spread" breakouts would move up so that we wouldn't have to scroll down so far to see those breakouts after applying a given filter. The file that you sent yesterday (V2) was definitely on the right track but just needed to be updated so that each breakout group (FTP Rate, Coupon, Spread) would each have their own column totals/ratios. You've already been a HUGE help by simplifying my original FILTER formula so if this isn't feasible then no worries.

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    Are they giving the correct results?

  16. #16
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    Tell me WHICH row is being returned in each column..

  17. #17
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    Yes, the formulas are all currently working and the results are correct for all of the ratios that are being populated in Row 7 and all of the calculations in Z:AE

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    NO. They are not.

    Take the formula in AB10.

    1. It is looking up the value in B10 (Mortgage) in the range '1. PopulationAttribution'!$S$613:$S$760. First mistake, You have NOT specified an exact match in the formula, so Excel is doing its own thing.

    2. It finds a match on row 60 of the range. There are no fewer than 12 rows in that range that correspeond to mortgage (highlighted in orange). How does Excel know which ONE to choose? Second mistake. You have not told it.

    3. If you use evaluate formula in Excel tools, you will see that the formula eventaully decides that it matches on row 60 of the range '1. PopulationAttribution'!$V$613:$V$760. The value on row 60 is, of course 0.055816. I have highlighted to row in purple. If you look at column S of that row, it refers to Acquired loans, NOT mortgages. If uou don't believe me... change cell V672 to 20. Look at column AB again.

    So. The calculated values are simply WRONG.

    As I said, there are 12 values for mortgage in that row. WHICH one is correct. it is not row 60.

    I could not reproduce your answers in your total rows when I started to look at the formula in (one of) your previous files... when the Pop. Attrib. tables had only ONE entry for mortgage. Hence my previous attempts to get you to look in detail at your own formulae. Now there are 12 possible matches, no indication of which one is correct, and the one it does return is for an entirely different category.

    So. Read the above carefully and respond even more carefully.
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 01-05-2024 at 07:29 AM.

  19. #19
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    1. The lookup should be pointing to column B, so Z9:AE9 was incorrectly pointing to column A.
    2. I think the issue is that in the "Real" data that I would be using, each 'RC Name' in column B would be a UNIQUE value and so there wouldn't ever be a filter that pulls in a series of identical (Mortgage) values.
    I created unique values for each RC Name and now all of the formulas in Z:AE are pulling back unique values.
    Condensing Filtered Data V5.xlsx

  20. #20
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    By now, I would normally have walked away from a problem like this. Such a major redefinition of a fairly massive project!!

    HOWEVER...

    Take a look. If there any further major changes, I'll be hiring a hit man. Capiche?
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    You nailed it! I can't thank you enough, this will drastically improve the report for the 50+ end-users who consume it every month. Where do I send the expensive bottle of wine ?

  22. #22
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: FILTER Function - How to condense a worksheet after filtering

    Thank heavens!! I'm in a remote village in the centre of Fuerteventura right now. It's been threatening to pour all day so it gave me something to do... in between reading and taking a few language lessons on Duolingo.

    You're welcome and thanks for the feedback.

  23. #23
    Registered User
    Join Date
    04-08-2011
    Location
    London
    MS-Off Ver
    O 365
    Posts
    80

    Re: FILTER Function - How to condense a worksheet after filtering

    NM i was able to update the code accordingly
    Last edited by dash11; 01-11-2024 at 02:13 PM.

+ 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] FILTER Function | How to Condense the ?Include? Argument?
    By Nevanox in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 12-11-2022, 11:24 AM
  2. Filter Function Filtering a Pivot Table: How to reference it as an object
    By wherdzik in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2022, 11:12 AM
  3. FIltering items in a filter list using the IF function
    By NedShneeb in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-11-2016, 04:47 AM
  4. [SOLVED] Filtering Arrays using the filter function
    By Xrull in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-27-2014, 12:47 PM
  5. multidimensional index and match function to condense table
    By Kamleshsoni in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2013, 04:32 PM
  6. Worksheet Filtering - How to see # of occurrences rather than Filter Mode?
    By harrywaldron in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-27-2009, 01:39 PM
  7. Replies: 0
    Last Post: 06-20-2007, 08:53 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