+ Reply to Thread
Results 1 to 10 of 10

How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

Hybrid View

  1. #1
    Registered User
    Join Date
    12-13-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4

    Post How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    0 cat
    2 elephant
    7 doll
    8 apple
    9 ball

    My Data is in above form in excel.
    I want to extract the the figure corresponding to maximum value in column 1 which is also divisible by 2 which is apple as 8 is divisible by 2 and max value.
    My data is lot more than this but I want a formula which can cater to this need.
    Attached Images Attached Images

  2. #2
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    Array
    =MAX(IF(MOD(A1:A5,2)=0,A1:A5))
    non array
    =AGGREGATE(14,6,A1:A5/(MOD(A1:A5,2)=0),1)

  3. #3
    Registered User
    Join Date
    12-13-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    Thank you. I wanted to have corresponding value so I used VLOOKUP along with MAX IF MOD.

  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 2406
    Posts
    44,662

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    I suspect that Govind0186 wants the value from column B... in which case modify the second formula above:

    =VLOOKUP(AGGREGATE(14,6,($A$2:$A$6)/(MOD($A$2:$A$6,2)=0),1),$A:$B,2,FALSE)

    and just set using ENTER
    Attached Files Attached Files
    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

  5. #5
    Registered User
    Join Date
    12-13-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    Quote Originally Posted by Glenn Kennedy View Post
    I suspect that Govind0186 wants the value from column B... in which case modify the second formula above:

    =VLOOKUP(AGGREGATE(14,6,($A$2:$A$6)/(MOD($A$2:$A$6,2)=0),1),$A:$B,2,FALSE)

    and just set using ENTER
    Thank you Glenn. Really helpful

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,738

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    Another option, if you have the dynamic array functions.
    =INDEX(SORT(FILTER(A2:B6,MOD(A2:A6,2)=0),1,-1),1,2)

  7. #7
    Registered User
    Join Date
    01-02-2020
    Location
    Munich, Germany
    MS-Off Ver
    Office 365
    Posts
    10

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    Hi,

    if sorted:

    =XLOOKUP(-1,-ISEVEN(-A2:A6),B2:B6,,,-1)

  8. #8
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    for sorted and old excel version
    array formula
    =VLOOKUP(1=1,CHOOSE({1,2},MOD(A2:A6,2)=0,B2:B6),2)
    or
    =VLOOKUP(1=1,IF({1,0},MOD(A2:A6;2)=0,B2:B6),2)
    Attached Files Attached Files

  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 2406
    Posts
    44,662

    Re: How to use MOD as a criteria in MAXIFS formula or any other solution to my problem

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It would also be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

  10. #10
    Registered User
    Join Date
    12-13-2020
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    4
    Quote Originally Posted by Glenn Kennedy View Post
    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It would also be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.
    Sure. I ll do that

+ 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. Problem with MINIFS and MAXIFS
    By mimich in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-21-2019, 01:29 PM
  2. Offset Maxifs with Multiple Criteria
    By noobsesher in forum Excel General
    Replies: 1
    Last Post: 06-08-2019, 11:38 PM
  3. MAXIFS with OR criteria
    By HalPlz in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-06-2019, 03:24 AM
  4. MAXIFS Problem - Non-Adjacent Range Name
    By willyt19712 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-24-2019, 06:02 PM
  5. MAXIFS with criteria
    By shiftyspina in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 01-25-2017, 10:14 AM
  6. solution:formula problem
    By cmgb802 in forum Excel General
    Replies: 1
    Last Post: 04-15-2010, 04:11 PM
  7. [SOLVED] Need solution to formula problem
    By sweetsue516 in forum Excel General
    Replies: 1
    Last Post: 08-31-2005, 11:05 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