+ Reply to Thread
Results 1 to 9 of 9

In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

  1. #1
    Registered User
    Join Date
    12-17-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    5

    In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Hi,
    What I would like to do is write a formula that replaces me filtering the headers to determine which individual ONLY has a Ford (they cannot own any other car). Obviously, I could simply filter the headers to "Ford" and eliminate the rest of the Manufacturers but was wondering could I write a formula that basically does that in cells B13 - B18? I've attached the spreadsheet for reference. I'm assuming at a minimum, there has to be some sort of IF statement where any entries in Columns C-F are automatically eliminated. Thank you in advanced and apologies for the silly question.
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Use cell H1 to specify which car you are interested in (e.g. Ford), then put this formula in H2:

    =IFERROR(IF(INDEX($B$2:$F$7,0,MATCH(H$1,$B$1:$F$1,0))="Y",MAX(H$1:H1)+1,"-"),"-")

    copy down to H7 (in your example). Then you can use this formula in B13:

    =IF(ROWS($1:1)>MAX(H:H),"",INDEX($A$2:$A$7,MATCH(ROWS($1:1),$H$2:$H$7,0)))

    Copy this down to B18. Then you can change the name of the car in H1 and see the list of names change accordingly.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-17-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Hi Pete thanks for your help! I followed your instructions but was curious if i am doing something wrong as the results in B13-B18 should only show Dave, Mary, and Candace as I am seeking to only return value back for those who only have Ford (if they have other cars, then they would not count). Fred should not be listed since he doesn't only have Ford. I'm attaching an updated spreadsheet for reference and thank you again
    Attached Files Attached Files
    Last edited by AliGW; 06-22-2022 at 04:54 AM. Reason: PLEASE don't quote unnecessarily!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    You can make this change to the formula in H2:

    =IFERROR(IF(AND(INDEX($B$2:$F$7,0,MATCH(H$1,$B$1:$F$1,0))="Y",COUNTIF(B2:F2,"Y")=1),MAX(H$1:H1)+1,"-"),"-")

    (changes shown in red), then copy it down.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    12-17-2013
    Location
    Atlanta
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Got it thanks Pete so much for your help!
    Last edited by AliGW; 06-22-2022 at 04:55 AM. Reason: PLEASE don't quote unnecessarily!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Glad to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    You might also like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  7. #7
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,249

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Hello, @Pete_UK.

    For some reason, the first AND argument in your formula in post #4 returns FALSE, so the formula returns "-".
    So I gave it a little tweak:
    =IFERROR(IF(AND(INDEX($B$2:$F$7,ROWS(A$1:A1),MATCH(H$1,$B$1:$F$1,0))="Y",COUNTIF(B2:F2,"Y")=1),MAX(H$1:H1)+1,"-"),"-")
    Anyway, just for my information, I'd appreciate it if you would please tell me why, or what I may be doing wrong.

    Thanks.

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Maybe XL365 treates INDEX differently. You can also do it like this in H2:

    =IFERROR(IF(AND(INDEX($B$2:$F$7,ROW(A2)-1,MATCH(H$1,$B$1:$F$1,0))="Y",COUNTIF(B2:F2,"Y")=1),MAX(H$1:H1)+1,"-"),"-")

    which, it could be argued, is slightly easier to follow as the formula is on row 2.

    Hope this helps.

    Pete

  9. #9
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,249

    Re: In Lieu of Filtering/Pivot Tables, What Formula Can Replicate Filtering?

    Right. So I thoguht.
    Thanks, Pete.

+ 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. Filtering pivot tables by value
    By hudg16 in forum Excel General
    Replies: 1
    Last Post: 05-27-2021, 11:28 AM
  2. Filtering and Pivot Tables
    By doritos5991 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-19-2019, 11:26 AM
  3. Filtering in Pivot Tables
    By bat069 in forum Excel General
    Replies: 1
    Last Post: 08-24-2011, 04:19 AM
  4. Filtering data in lieu of pivot table
    By Tommy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2010, 01:37 PM
  5. Filtering Pivot Tables
    By Smonczka in forum Excel General
    Replies: 2
    Last Post: 02-01-2006, 01:40 PM
  6. Filtering within Pivot Tables
    By Meares in forum Excel General
    Replies: 0
    Last Post: 08-09-2005, 10:05 AM
  7. [SOLVED] Filtering pivot tables
    By Darren in forum Excel General
    Replies: 2
    Last Post: 04-13-2005, 05:06 AM

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