+ Reply to Thread
Results 1 to 4 of 4

First and Last Instance within Date Range

  1. #1
    Registered User
    Join Date
    03-28-2016
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    33

    First and Last Instance within Date Range

    Hi,

    I'm trying to return the first and last instance of a blank cell within a date range without doing an array formula (the master spreadsheet is very large, so trying to make it as "quick" as possible).

    R1: Start date in range to be searched (will be manually updated)
    R2: End date in range to be searched (will be manually updated)

    Column O: List first instance of blank cell within date range identified in R1 (hoping to automate)
    Column P: List last instance of blank cell within date range identified in R2 (hoping to automate)

    I've manually entered the values in columns O&P in red text, so you can see what values I'm hoping to return. Any help would be greatly appreciated!

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    5,891

    Re: First and Last Instance within Date Range

    Try these:

    O4 =IFERROR(INDEX(D$3:L$3,INDEX(MATCH(1,(D$3:L$3>=S$1)*(D$3:L$3<=S$2)*(D4:L4=""),0),0)),"")

    P4 =IFERROR(LOOKUP(2,1/((D$3:L$3>=S$1)*(D$3:L$3<=S$2)*(D4:L4="")),D$3:L$3)+6,"")

    Drag both formulas down.

  3. #3
    Registered User
    Join Date
    03-28-2016
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    33

    Re: First and Last Instance within Date Range

    Thanks! It seems to be working. Out of curiosity, is there another way to achieve the formula in column P without using a look-up function?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider (Windows 11 64-bit)
    Posts
    55,021

    Re: First and Last Instance within Date Range

    Why do you wish to avoid the LOOKUP function?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

+ 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] Delete Each Instance of a String in a Range
    By Michael D in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-09-2018, 05:46 PM
  2. [SOLVED] Sum first instance of duplicates within a date range
    By akiaki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-22-2017, 08:24 AM
  3. [SOLVED] VBA Macro Needs to find Last Instance of in Range
    By mansions2find in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-03-2015, 05:54 AM
  4. Replies: 3
    Last Post: 07-15-2014, 09:50 AM
  5. [SOLVED] One instance of each value within a text range
    By jwillis07 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-10-2014, 09:34 AM
  6. search a range for an instance of A, B or VC
    By nigelog in forum Excel General
    Replies: 5
    Last Post: 02-15-2011, 09:02 AM
  7. [SOLVED] Find 2nd instance of a word in a range.
    By Grumpy Grandpa in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-05-2005, 11:35 AM

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