+ Reply to Thread
Results 1 to 7 of 7

Choose maximum value out of a number of values that match certain criterias from an array

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    Khartoum, Sudan
    MS-Off Ver
    Excel 2010
    Posts
    3

    Choose maximum value out of a number of values that match certain criterias from an array

    Hi All,

    Been a member for over a year, many thanks to all, it's been an educational experience.

    I am trying to write a formula that will do 2 steps:-

    1- Choose several values out of an array according to several criteria
    2- return the highest value amongst above chosen values

    Example

    Excel Forum.png

    In this Example i want a formula to be entered in column "G" that will calculate the number of days between the last return date of the vehicle and the shipping date of the vehicle on this row.

    In other words the formula in "G5" must give the result "2" since the vehicle 22 returned from its last ship on January 4th and then shipped again on the 6th, to me that's 2 days in standby, and "G8" must give the result "3" because the vehicle 23 last returned on Jan 12th and shipped again on the 15th.

    Any suggestions?!!

    If a formula can't calculate this, how can i rearrange the data tables so some sort of a formula can calculate the standby days accurately?
    Attached Images Attached Images

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

    Re: Choose maximum value out of a number of values that match certain criterias from an ar

    Attach a sample workbook - it is easier to work with an Excel sheet than a screenshot.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

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

    Re: Choose maximum value out of a number of values that match certain criterias from an ar

    Please upload excel workbook not a picture. Nobody likes to retype data from the picture.
    If needed change all private informations but leave what's important to understand problem.

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Choose maximum value out of a number of values that match certain criterias from an ar

    Hello
    try this in G2
    =IFERROR(B2-INDEX($E$1:E1,MAX(IF(A2=$A$1:A1,ROW($A$1:A1),0))),"")
    and copy down
    This is an array formula to use this….. copy it from here…..then press F2 on the cell where you want the result.....cursor will appear....now paste the formula and press CTRL+SHIFT+ENTER instead of just enter as we usually do...

    Tell me if it works right….

    Hope it helps
    Do ask for any other query you may have…

    If you are satisfied then mark then PLEASE mark this thread as “SOLVED” (by going to thread tools at the top and clicking on “mark this thread as solved”) and you can just click on ADD REPUTATION below my post to say thanks...

    Regards
    Sourabh Gupta

  5. #5
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Choose maximum value out of a number of values that match certain criterias from an ar

    Put this formula in G5 and Drag Down
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  6. #6
    Registered User
    Join Date
    01-07-2014
    Location
    Khartoum, Sudan
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Choose maximum value out of a number of values that match certain criterias from an ar

    Hi,

    Sorry for the late reply and messed up thread, i thought a removed the extra images, they must be confusing.

    I attached an excel sheet, the formula am looking for will have to be entered in column "H".
    each row represents data relevant to a single shipment.
    i need to calculate how many days every vehicle is idle after return date until the next shipping date.
    Usually going down rows you will find trips that have been done later, but not as a rule, so i cant say it's in any type of order.

    i tried the suggestions given, but i suppose because of the several screenshots attached "by me!!" it's not working, but am much closer to understanding the formula's to be used.


    What does "desensitize" mean? i tried Google translate, i don't know how to remove "emotions" from my data?!!

    awaiting more suggestions,

    Thanks in advance
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-07-2014
    Location
    Khartoum, Sudan
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Choose maximum value out of a number of values that match certain criterias from an ar

    Thanks Vikas_Gautam your solution worked after changing it to
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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. Look at multiple criterias to see if table values match values of other tables
    By gaudi93080 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-15-2014, 06:45 PM
  2. Match two values between two list using two criterias
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 09:56 AM
  3. Replies: 1
    Last Post: 05-17-2011, 08:44 PM
  4. Compare a value to a number of ranges and choose the maximum
    By Basq8 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-08-2011, 04:43 AM
  5. How to match 2 criterias in an array?
    By e4excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-07-2009, 03:16 PM

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