+ Reply to Thread
Results 1 to 4 of 4

Nested If statement for Date Comparison

  1. #1
    Registered User
    Join Date
    07-27-2021
    Location
    Weston-super-Mare
    MS-Off Ver
    365 Apps
    Posts
    17

    Nested If statement for Date Comparison

    I’ve been puzzling over this for a couple of days, nearly there but I really don’t think I’m going the right way about it.

    Column A is not needed in this problem.

    Column B is the Action Target Date (ATD) – forecast Action Completion Date
    Column C is the Action Proposed Closed Date (PCD) –day the action is completed
    Column D is the Executive Meeting Date (EMD) – Day signed off by the Committee.

    The Cell = Date of the Next EMD

    Column E = results

    I need to;
    Look at the EMD and if it is occupied, leave the Result either Empty or have the word ‘Closed’, or
    Look at the PCD and if it is Empty, make the Result ‘No PCD, or
    Look at the ATD and compare it with the EMD Look-up date and if the ATD is earlier than the Look-up date, make the Result ‘Early’, if not make the Result ‘Late’.

    I have the following that nearly works

    =
    IF(OR(D2<>"","Closed",""),
    IF(OR(C2<>"","No PCD",""),
    IF(F2>=N2,"Early","Late")))

    But it gives me ‘Early’/’Late’ where I should have ‘Closed’ and ‘FALSE’ where I should have ‘No PCD’
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Nested If statement for Date Comparison

    Try this in E2:

    =IF(D2<>"","Closed",IF(C2="","No PCD",IF(B2<'EMD Date'!$D$3,"Early","Late")))

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    07-27-2021
    Location
    Weston-super-Mare
    MS-Off Ver
    365 Apps
    Posts
    17

    Re: Nested If statement for Date Comparison

    Pete,

    That works, my very many thanks.

    Bryan

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Nested If statement for Date Comparison

    Glad to help, Bryan, and welcome to the forum.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. Nested IF statement error. Nested True statement is not triggering
    By Lucas7040 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-26-2016, 11:41 AM
  2. [SOLVED] Date Comparison in VBA versus if statement on sheet not equivalent?
    By beutlerm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2015, 02:08 PM
  3. [SOLVED] Nested If statement based on date
    By adamdaniel143 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-08-2014, 02:53 AM
  4. Nested What If statement using date ranges
    By Glenn1 in forum Excel General
    Replies: 3
    Last Post: 01-08-2012, 04:13 PM
  5. Nested What If statement using date ranges
    By Glenn1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-08-2012, 01:41 PM
  6. Replies: 2
    Last Post: 10-07-2006, 09:23 AM
  7. Date Comparison and IF statement
    By Holly in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-18-2006, 09:10 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