+ Reply to Thread
Results 1 to 5 of 5

Comparing two dates and ignoring blank cells

  1. #1
    Registered User
    Join Date
    12-11-2024
    Location
    York, England
    MS-Off Ver
    365
    Posts
    2

    Comparing two dates and ignoring blank cells

    Hello,

    I have a spreadsheet with two dates, G10 is the target date and C29 is the achieved date.

    In cell G12 i have the formula =IF(G10>C29, "Yes", "No) to tell me if the target date was achieved or not.

    My issue is that if no dates are entered in G10 or C29, the formula in G12 is returning a "No" value.
    When I enter a date in cell G10 only, the formula in G12 returns a "Yes" value.
    Ideally I would like cell G12 to stay blank until both dates have been entered.

    This is a spreadsheet with multiple tabs, each one is a call out report and they all link back to a summary sheet which needs to be sent to a client so i need the correct response and if the call out hasn't happened yet, the cell needs to be blank.

    The date in cell G10 is populated from a formula so that is never blank.

    Does anyone have a solution??

    Thanks in advance!!

  2. #2
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Comparing two dates and ignoring blank cells

    Try, =IF(OR(G10="",C29=""),"",IF(G10>C29, "Yes", "No"))

  3. #3
    Registered User
    Join Date
    12-11-2024
    Location
    York, England
    MS-Off Ver
    365
    Posts
    2

    Re: Comparing two dates and ignoring blank cells

    Thank you! This works perfectly!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,759

    Re: Comparing two dates and ignoring blank cells

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Comparing two dates and ignoring blank cells

    You are welcome, thanks for the Rep.

+ 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. Calculate days between dates while ignoring blank cells
    By BigDaddyZ in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-29-2022, 07:56 PM
  2. Comparing Target and Delivery dates where some fields are blank.
    By GreggP in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-29-2022, 10:10 AM
  3. Replies: 6
    Last Post: 02-20-2020, 12:44 PM
  4. Replies: 3
    Last Post: 07-24-2017, 01:41 PM
  5. Excel 2007 : Ignoring Blank Cells
    By stellaselectxi in forum Excel General
    Replies: 4
    Last Post: 10-24-2010, 04:22 PM
  6. Ignoring cells with zero value or blank
    By Moshsoft in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-25-2009, 04:13 AM
  7. Comparing dates, but some date fields are blank.
    By dgarris in forum Excel General
    Replies: 1
    Last Post: 02-25-2007, 01:53 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