+ Reply to Thread
Results 1 to 4 of 4

Return latest non blank cell with multiple criteria

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Return latest non blank cell with multiple criteria

    Type ID Order Date Desired Result via Formula
    1 Z1 12345 Feb 5, 2016
    1 Z2 23456 Mar 8, 2016
    1 Z3 34567 Apr 2, 2016 Yes
    1 Z4 May 1, 2016
    1 Z5 Jun 9, 2016
    1 Z6 Jul 3, 2016 Yes
    2 Z1 98765 Mar 3, 2016
    2 Z2 87654 Apr 7, 2016
    2 Z3 May 4, 2016
    2 Z4 65432 Jun 8, 2016 Yes
    2 Z5 Dec 6, 2016
    2 Z6 46578 Dec 9, 2016 Yes

    Hello,

    The table above is a sample as well as the desired result that I'd like to accomplish.

    The login behind it are:

    Scenario 1:
    Return a 'YES' for the last non-blank 'Order' for the same 'Type'.

    Example of Scenario 1:
    Given the 'Type' 1, I have 3 non-blank 'Orders' (12345, 23456 and 34567) and 3 blank 'Orders' (date May1, Jun9 and Jul3). Although 'Orders' 12345 and 23456 are not blank, but they're not the 'last non blank cell' from Type 1. Thus invalid. The only valid is 'Orders' 34567.

    Given the 'Type' 2, I have 4 non-blank 'Orders' (98765, 87654, 65432 and 46578) and 2 blank 'Orders' (date May4, and Dec6). Although 'Orders' 98765, 87654 and 65432 are not blank, but they're not the 'last non blank cell' from Type 2. Thus invalid. The only valid is 'Orders' 46578.

    Scenario 2: ASSUME TODAY() is Aug 31, 2016
    Return a 'YES' for the same 'Type' and 'Dates' that are as close as TODAY'S DATE (which is Aug 31, 2016).

    Example of Scenario 2:
    Given the 'Type' 1, the closest date for Aug 31, 2016 is Jul3.

    Given the 'Type' 2, the closest date for Aug 31, 2016 is Jun8.


    I hope the above scenarios and examples explained clearly what I'm trying to accomplished. Thus the question is, what functions that enable me to get the result that I want? I tried LOOKUP formula to get the last non-blank cell, but it won't work with multiple criteria.

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

    Re: Return latest non blank cell with multiple criteria

    Hi there. Here's one way, using this array formula:

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


    Array Formulae are a little different from ordinary formulae 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 brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use 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 brackets yourself - it won't work...
    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.

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

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Return latest non blank cell with multiple criteria

    Solved and reps up to you!

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

    Re: Return latest non blank cell with multiple criteria

    You're welcome and thanks for the Rep.

+ 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. Return Latest Date Based on a Criteria
    By skate1991 in forum Excel General
    Replies: 3
    Last Post: 09-09-2015, 04:51 AM
  2. Return latest date based on matching criteria
    By senthilvenkatesh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-25-2014, 02:49 AM
  3. how to return the latest text in the row or column with blank cells
    By vijayaragavan in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 01-19-2014, 01:10 PM
  4. [SOLVED] How to return value blank cell, if criteria do not match
    By devawad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-25-2013, 08:14 AM
  5. [SOLVED] How to return value blank cell, if criteria do not match
    By devawad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-25-2013, 05:21 AM
  6. How to return a blank cell based on if then criteria
    By azucar360 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-01-2013, 04:05 PM
  7. Replies: 1
    Last Post: 01-20-2012, 09:44 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