+ Reply to Thread
Results 1 to 18 of 18

max if formula

  1. #1
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    max if formula

    Dear sir,
    i tried to get latest production time in a sequence production
    please check this excel file and guide me to find out the solution
    Attached Files Attached Files
    Last edited by Ram1525; 06-14-2013 at 10:44 AM. Reason: solved

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: max if formula

    Can you give some more explanation?

  3. #3
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    please check the excel file.. i tried this formula to get latest production date and time
    =MAX(IF($D$17:$D$30=D31,$J$17:$J$30,$C$17:$C$30))
    please check file and help to get the solution

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: max if formula

    Can you give us your expected result

  5. #5
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    if i entered "D" in the d32 cell the 6:00A.M should appear in the result cell..

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: max if formula

    First, you need to lock the ranges in your formula

    You have this in K31
    =MAX(IF($D$17:$D$30=D31,J17:J30))

    As you fill it down to K32, it changes to
    =MAX(IF($D$17:$D$30=D32,J18:J31))
    the D31 is supposed to change to D32, but the J17:J30 is supposed to stay the same.
    So the formula in K32 is pulling the result from the wrong place (1 cell down)

    So the formula should be
    =MAX(IF($D$17:$D$30=D31,J$17:J$30))

    Now, why do you expect the result should be 6AM ?
    the MAX (largest) time value in column J where Column D = "D" is NOT 6AM, it's 11:30PM in Cell J21

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: max if formula

    Maybe 11:00 AM?

    Try lock range:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    here the time columns has been taken only..i would like to take both date and time.
    so i expected the result 6:00 AM
    =MAX(IF($D$17:$D$30=D31,J$17:J$30,C$17:C$30))
    but i did not the result..

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: max if formula

    Try this in K31 and filled down.

    =MAX(IF($D$17:$D$30=D31,$C$17:$C$30+$J$17:$J$30))

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: max if formula

    OK. This is formula you need to use, only you need to add date in 2-Jun-13 in C32 (in front of D):

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

  11. #11
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    =MAX(IF($D$17:$D$30=D31,$C$17:$C$30+$J$17:$J$30))
    This formula works well as i expected..
    This you very much Mr. Jonmo1 and Mr.zbor
    thank a lot..

  12. #12
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    This works as CSE formula only..
    =MAX(IF($D$17:$D$30=D32,$C$17:$C$30+$J$17:$J$30))
    if i try to drag the formula it did not work correctly.
    i need to edit (CSE) every cell.. is there any way with out CSE..

  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: max if formula

    CSE should work when you dragging formula down.

  14. #14
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: max if formula

    Quote Originally Posted by Ram1525 View Post
    is there any way with out CSE..
    Perhaps

    =SUMPRODUCT(MAX((D17:D30=D32)*C17:C30+J17:J30))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  15. #15
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    Thank you very much Mr.Fotis..

  16. #16
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: max if formula

    ...........................

  17. #17
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    that formula did not work correctly in some cell especially in the next date cells
    i have attached the excel file please help me..
    Attached Files Attached Files
    Last edited by Ram1525; 06-15-2013 at 01:49 AM.

  18. #18
    Registered User
    Join Date
    06-05-2013
    Location
    chennai
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: max if formula

    cirr.jpg
    Thanking you
    Ram..
    Last edited by Ram1525; 06-15-2013 at 02:13 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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