+ Reply to Thread
Results 1 to 10 of 10

Excel - Formula to find multiple variables

  1. #1
    Registered User
    Join Date
    05-17-2018
    Location
    Melbourne, australia
    MS-Off Ver
    Excel 365
    Posts
    20

    Excel - Formula to find multiple variables

    Hi Guru's

    Stumped on another one and wondering if I can get some expert help please?

    I need a formula to count how many times a company has a vehicle, that has a Permit A and a Permit B.
    Difficult part for me is that vehicle REGO is listed many times.

    Manual answers are:


    Joe Trump Co 2
    Don Biden 1
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by tbomdiggity; 07-19-2024 at 01:09 AM. Reason: solved

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Excel - Formula to find multiple variables

    Not sure how you arrive at 2?

    You have 7 with Joe and A
    You have 5 with Joe and B
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,933

    Re: Excel - Formula to find multiple variables

    I understand what you need, but are you still using Excel 2016 or something newer?
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,996

    Re: Excel - Formula to find multiple variables

    G2=IF($F2<>"",SUM(IF(FREQUENCY(IF($C$2:$C$19=F2,IF(ISNUMBER(MATCH($B$2:$B$19,$B$9:$B$10,0)),MATCH($D$2:$D$19,$D$2:$D$19,0))),ROW($A$2:$A$19)-ROW($A$2)+1),1)),"")

    Copy down

    why ? 2 and 1 ?

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,933

    Re: Excel - Formula to find multiple variables

    If you have upgraded to 365, this should do what you want:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-17-2018
    Location
    Melbourne, australia
    MS-Off Ver
    Excel 365
    Posts
    20

    Re: Excel - Formula to find multiple variables

    Im using Office 365

    Thanks for your responses and Im sorry, perhaps I didnt explain well enough.


    Joe Trump Co has 2 vehicles REGO's that have both an A and B Permit.
    (light green match, dark green match)

    Don Biden has 1 vehicle that has a A and B Permit
    (pink)

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,933

    Re: Excel - Formula to find multiple variables

    Please update your forum profile and see the 365 solution in post #5.

  8. #8
    Registered User
    Join Date
    05-17-2018
    Location
    Melbourne, australia
    MS-Off Ver
    Excel 365
    Posts
    20

    Re: Excel - Formula to find multiple variables

    Thank you AliGW!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,933

    Re: Excel - Formula to find multiple variables

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  10. #10
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Excel - Formula to find multiple variables

    Try in G2, copy down:
    =LET(x,CHOOSECOLS(UNIQUE(FILTER($B$2:$D$20,($C$2:$C$20=F2)*(($B$2:$B$20="A")+($B$2:$B$20="B")))),3),COUNTA(x)-COUNTA(UNIQUE(x)))

+ 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] Excel - Formula to find multiple variables
    By tbomdiggity in forum Excel General
    Replies: 4
    Last Post: 07-17-2024, 02:24 AM
  2. [SOLVED] Complicated formula needed to find value in a range with multiple variables.
    By tml2424 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-05-2020, 04:22 AM
  3. find the best 3 values with multiple variables
    By pivottc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-11-2016, 02:09 PM
  4. Find value with multiple variables and change value in other column
    By rpinxt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-03-2014, 05:36 AM
  5. Replies: 1
    Last Post: 05-12-2014, 10:25 PM
  6. Excel 2007 : Find Multiple Variables
    By Rachel86 in forum Excel General
    Replies: 1
    Last Post: 12-09-2009, 08:09 PM
  7. Replies: 4
    Last Post: 07-31-2008, 09:04 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