+ Reply to Thread
Results 1 to 9 of 9

IF/OR Formula

  1. #1
    Registered User
    Join Date
    10-26-2017
    Location
    USA
    MS-Off Ver
    Microsoft 365
    Posts
    5

    IF/OR Formula

    I am trying to get a formula that reads the last cell of a column that has any information, and to identify that value as "complete" if the day is today-2 OR today-1.

    =IF(LOOKUP(2,1/(D:D<>""),D:D)=TODAY()-2,"completed") works fine. When I try =IF(OR((LOOKUP(2,1/(D:D<>""),D:D)=TODAY()-1),(LOOKUP(2,1/(D:D<>""),D:D)=TODAY()-2),"completed")) it does not work. Could someone please advise how I can get this formula working or if there is a better way to do this?

    Thanks!

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

    Re: IF/OR Formula

    Hello and welcome to the forum.

    Instead of sharing a non-working formula, please upload a small representative sample of your data along with the desired output of the formula (manually entered).

    To upload a workbook, click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF/OR Formula

    Looks like you have a parenthesis wrongly placed - try this

    =IF(OR(LOOKUP(2,1/(D:D<>""),D:D)=TODAY()-1,LOOKUP(2,1/(D:D<>""),D:D)=TODAY()-2),”Completed”)

    Or shorter

    =IF(OR(LOOKUP(2,1/(D:D<>""),D:D)=TODAY()-{1,2}),”Completed”)
    Audere est facere

  4. #4
    Registered User
    Join Date
    10-26-2017
    Location
    USA
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: IF/OR Formula

    @63falcondude, thanks for the welcome! I cannot upload anything at this time, but basically all of column D is a string of dates (10/1/2017, 10/3/2017, etc) starting from cell D7 down.

    @daddylonglegs, thank you for the quick response! Unfortunately, those formulas are not working out for me. I am getting the #NAME? error. I have been wondering if the better solution would be to do something like TODAY is greater than -2, but am not sure how to phrase it formula-wise.

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

    Re: IF/OR Formula

    Perhaps the NAME error is due to the quotes.

    Change ” to ".
    Last edited by 63falcondude; 10-26-2017 at 12:48 PM. Reason: typo

  6. #6
    Registered User
    Join Date
    10-26-2017
    Location
    USA
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Re: IF/OR Formula

    That was totally it! Thank you both so much! This helped a lot!
    Last edited by formulaquestion; 10-26-2017 at 08:10 PM.

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: IF/OR Formula

    I didn't do much but I'm glad that we could help.

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

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: IF/OR Formula

    Quote Originally Posted by 63falcondude View Post
    Perhaps the NAME error is due to the quotes.

    Change ” to ".
    Thanks falcondude - I’m on my iPad and it’s definitely punctuactionally challenged

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: IF/OR Formula

    Happy to assist. Happens if you write out a formula in Word too.

+ 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. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  2. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  3. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  4. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04: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