+ Reply to Thread
Results 1 to 7 of 7

Locate highest status and return "XYZ" based on what is located into new cell same row

  1. #1
    Registered User
    Join Date
    03-16-2013
    Location
    DK
    MS-Off Ver
    Excel 2010
    Posts
    16

    Locate highest status and return "XYZ" based on what is located into new cell same row

    I have looked (Googled) many places but not really found what I was looking for.
    Don't know if I search/ask in the wrong way, but now I'll try in here.

    In regards to a shipment flow, we have different stages in which the package will go through before being delivered.

    There is a PICKUP phase, DEPARTURE phase, ARRIVAL phase & a DELIVERY phase
    In each phase I have dates (yyy-mm-dd)
    I can have ESTIMATED dates & I can have ACTUAL dates (Sample sheet attached)
    Sample setup is similar but not identical to the "live" file

    I have 8 columns where cells can be
    • Completely blank
    • Have formulas, which either returns a date or returns nothing
    • Simply has a date (No formulas)

    For the people knowing the transport business, it is well known that we can have ANY sort of combination of blanks / dates in ALL 8 columns.
    Meaning that in one phase we might have only one date, in the next phase we might have both dates and in another phase we don't have any dates at all..

    I have tryed to illustrate in the sheet what I would like to have as a result.
    Basically I want to see the highest phase where there is a date

    The answer might be obvious & right in front of me, but right now I have come up empty...
    Hope someone can help..

    Regards
    Henrik
    Attached Files Attached Files

  2. #2
    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,778

    Re: Locate highest status and return "XYZ" based on what is located into new cell same row

    Will the dates always be chronological from left to right?
    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.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: Locate highest status and return "XYZ" based on what is located into new cell same row

    You can use the array* formula in J5:

    =MAX(IF(B5:I5<>"",$B$2:$I$2))

    then copy down.

    *An array formula needs to be committed using the key combination of Ctrl-Shift-Enter (CSE) rather than the usual < Enter >.

    If you want to see the colours that you show in your sample file then you will have to apply conditional formatting with 8 different rules.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    03-16-2013
    Location
    DK
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Locate highest status and return "XYZ" based on what is located into new cell same row

    @ AliGW

    Mostly yes, but unfortunately there can be exceptions..

    It can happen that the estimated date for a higher phase is sooner than the actual date from the phase prior.
    i.e. 01-04-2016, 03-04-2016, 02-04-2016, 04-04-2016, etc... (est. pickup, act. pickup, est. departure, act. departure, etc..)

    Sample file updated..
    Attached Files Attached Files

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

    Re: Locate highest status and return "XYZ" based on what is located into new cell same row

    But will the last date recorded on any row be the highest? If so, Pete's formula will work.

  6. #6
    Registered User
    Join Date
    03-16-2013
    Location
    DK
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Locate highest status and return "XYZ" based on what is located into new cell same row

    @ Pete_UK

    Spot on...
    Works in this sample..

    But I will need to test when there are other columns in between these 8..

    Hang on..

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

    Re: Locate highest status and return "XYZ" based on what is located into new cell same row

    Do I detect a shifting of goalposts???

+ 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] Formula to Locate Matching Data in Worksheets and return "1" or "0" to a specified Cell
    By hammer2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-30-2015, 04:52 AM
  2. [SOLVED] Formula to Locate Matching Data in Worksheets and return Yes or "" to a specified Cell
    By hammer2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-23-2015, 06:12 AM
  3. Trying to have the pivotfields(" ") be the cell content located in another worksheet
    By rtpuglisi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-10-2014, 04:06 PM
  4. VBA: How to locate the last "CELL" of a specific "COLUMN"
    By RonGreen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2013, 04:54 PM
  5. Replies: 3
    Last Post: 04-14-2013, 11:53 PM
  6. Replies: 10
    Last Post: 06-10-2012, 03:55 PM
  7. List "OPEN" orders based on a status column
    By beechum1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-13-2006, 08:15 AM

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