+ Reply to Thread
Results 1 to 6 of 6

Formula needed to return value prior time

  1. #1
    Registered User
    Join Date
    11-24-2020
    Location
    Wales
    MS-Off Ver
    10
    Posts
    3

    Formula needed to return value prior time

    Hi,

    I am trying to find a value that is time related that was the last value prior to a specific time and date.


    Find "E" IF "D" largest value prior to "A"
    Attached Files Attached Files

  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
    43,984

    Re: Formula needed to return value prior time

    You have two minor problems with your data. Columns A and D are TEXT that looks like date/time. To convert to date/time:

    Select column A. Data/Text to columns/Finish.

    Repeat for column D. Then use this formula, dragged down:

    =IFERROR(LOOKUP(2,1/(($E$2:$E$22<>"")*($D$2:$D$22<=$A2)),$E$2:$E$22),"")
    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
    Registered User
    Join Date
    11-24-2020
    Location
    Wales
    MS-Off Ver
    10
    Posts
    3

    Re: Formula needed to return value prior time

    Fab.

    If I just wanted to return the prior date and time regardless to the value in "E" what you I deed to remove from the formual?

    Regards,

    Zoe

  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
    43,984

    Re: Formula needed to return value prior time

    Like this:

    =IFERROR(LOOKUP(2,1/(($D$2:$D$22<=$A2)),$D$2:$D$22),"")



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  5. #5
    Registered User
    Join Date
    11-24-2020
    Location
    Wales
    MS-Off Ver
    10
    Posts
    3

    Re: Formula needed to return value prior time

    Hi,

    Thanks for your help.

    I believe it was =IFERROR(LOOKUP(2,1/(($D$2:$D$22<=$A2)),$E$2:$E$22),"") that was needed


  6. #6
    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
    43,984

    Re: Formula needed to return value prior time

    Quote Originally Posted by Zoelouiseh View Post
    Hi,

    Thanks for your help.

    I believe it was =IFERROR(LOOKUP(2,1/(($D$2:$D$22<=$A2)),$E$2:$E$22),"") that was needed

    No... that will return the value column. The dates are in column D??? Or am I missng something (like a brain, perhaps?)

+ 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] Return Month-on-Month growth using current month-prior month/prior month per country
    By losincog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2020, 05:37 AM
  2. [SOLVED] Formula to get (Prior Biz Day) and (Prior Biz Day -1); ex-holidays
    By Phillycheese5 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-15-2013, 09:29 AM
  3. Replies: 2
    Last Post: 01-30-2013, 01:04 AM
  4. [SOLVED] Warning Message needed prior to clearing spreadsheet
    By jrtdcg in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-29-2012, 12:41 PM
  5. Return two most recent values prior to specified date?
    By tgallag1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-09-2011, 11:47 AM
  6. [SOLVED] Return to prior location
    By DR in forum Excel General
    Replies: 0
    Last Post: 01-06-2005, 02:06 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