+ Reply to Thread
Results 1 to 3 of 3

Lookup cell between dates

  1. #1
    Registered User
    Join Date
    11-11-2020
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    46

    Lookup cell between dates

    Dear All,

    I have a situation:

    I need to manufacture something and I need to change battery regularly to ensure the manufacture does not fail.
    I want column B to remind me which battery to use based on the information from cells E-G.

    For example, on 10/10/2020 (A2), I need to use battery A because battery A is opened on 23/09/2020 and expires on 23/12/2020

    My formula in B2 is =IF(AND(A2>$F$2,A2<$G$2),$E$2,OFFSET($E$2,1,0))

    This works well, but when this formula cannot pick up battery C because the offset value is 1 row and not dynamic. Sorry I may not have explained very well.

    Please find the attached Excel and I'd really appreciate if you could give me a hand on this.

    Kind regards,
    Ken
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: Lookup cell between dates

    Try this in B2:

    =LOOKUP(2,1/($F$2:$F$8<>"")/($F$2:$F$8<=A2)/($G$2:$G$8>=A2),$E$2:$E$8)

  3. #3
    Registered User
    Join Date
    11-11-2020
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    46

    Re: Lookup cell between dates

    Thanks a lot! This solves my problem.

    Do you mind explaining how does this formula work?

+ 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] Lookup 2 different dates and return a horizontal lookup
    By pmw19800 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-16-2018, 05:26 AM
  2. Replies: 8
    Last Post: 07-20-2018, 11:52 AM
  3. [SOLVED] Lookup dates in cell range and return latest date and name
    By Glorioso999 in forum Excel General
    Replies: 6
    Last Post: 01-28-2017, 12:43 PM
  4. Replies: 2
    Last Post: 10-21-2013, 07:55 PM
  5. Replies: 4
    Last Post: 10-04-2012, 05:17 AM
  6. Replies: 1
    Last Post: 06-25-2012, 12:45 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