+ Reply to Thread
Results 1 to 13 of 13

IF Function

  1. #1
    Registered User
    Join Date
    03-16-2015
    Location
    India
    MS-Off Ver
    Office 2010
    Posts
    8

    IF Function

    Dear Frineds,

    I need to implement if Function on a table as
    c d e
    5 m n p
    6 0 6 10

    if I m using if formula to find out the largest then m,n,p will be displayed

    IF(C6>D6,C5,IF(AND(C6>E6),C5,IF(AND(D6>E6),D5,IF(AND(D6>C6),D5,IF(AND(E6>C6),E5,C6)))))

    When i am using the above formulae, I m not getting 10 the largest, please correct me where i m wrong.

  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,194

    Re: IF Function

    iS THIS WHAT YOU WANTED?
    =INDEX(C5:E5,MATCH(MAX(C6:E6),C6:E6,0))
    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
    03-16-2015
    Location
    India
    MS-Off Ver
    Office 2010
    Posts
    8

    Re: IF Function

    Dear Glenn,

    Thnaks Sir it was working it is in same row, if alternate row how this formulae work.

  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,194

    Re: IF Function

    Can you explain what you mean by that a bit more clearly?

  5. #5
    Registered User
    Join Date
    03-16-2015
    Location
    India
    MS-Off Ver
    Office 2010
    Posts
    8

    Re: IF Function

    Dear Glenn,

    Thanks Sir,

    i m using which is the max of three in alternate column of a same row
    Attached "if statement.jpg"If statement.jpg

  6. #6
    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,194

    Re: IF Function

    If your data are in A1 to F1, then is this it:

    =INDEX(A1:F1,MATCH(MAX(A1:F1),A1:F1,0)-1)
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-16-2015
    Location
    India
    MS-Off Ver
    Office 2010
    Posts
    8

    Re: IF Function

    Thanks Glenn for your help

    Please find attached book2.xls I need the answer as required. how to use the formulae as given in red.
    Attached Files Attached Files

  8. #8
    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,194

    Re: IF Function

    To return the maximum rate use this array formula:
    =MAX(IF(B12:G12="rate",B13:G13))

    To return the supplier of that rate, use this array formula:
    =INDEX(B11:G11,MATCH(MAX(IF(B12:G12="rate",B13:G13)),B13:G13,0))

    Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,366

    Re: IF Function

    Based on your example ...

    =INDEX(B11:G11,,MATCH(MAX(B13:G13),B13:G13,0))

    Note this works because the amount is proportional to the rate (i.e. Rate * 5). Is this always true i.e the greater the rate, the greater the amount?

    And please don't use merged cells. The letters are now in columns C, E and G for the above formula.

  10. #10
    Registered User
    Join Date
    03-16-2015
    Location
    India
    MS-Off Ver
    Office 2010
    Posts
    8

    Re: IF Function

    Thanks Glenn,

    I want to know Why we use CTRL+SHIFT+ENTER in the above formula and why we can't simple ENTER .

  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,194

    Re: IF Function

    Using MAX-IF requires the formula to be array entered, to facilitate repeated calculations. If you don't want an array formula, for whatever reason, you could also try AGGREGATE.

  12. #12
    Registered User
    Join Date
    03-16-2015
    Location
    India
    MS-Off Ver
    Office 2010
    Posts
    8

    Re: IF Function

    Thanks Glenn for your reply for doubt,

  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,194

    Re: IF Function

    Glad to have helped! If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. It'd also be appreciated if you were to click the add Reputation button at the foot of any of the posts of those who helped you reach a solution.

+ 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. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  2. Replies: 2
    Last Post: 01-15-2014, 11:40 PM
  3. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  4. [SOLVED] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  5. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  6. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  7. [SOLVED] Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04: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