+ Reply to Thread
Results 1 to 5 of 5

Ignoring a blank date cell

  1. #1
    Registered User
    Join Date
    01-23-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    3

    Ignoring a blank date cell

    Hi

    I've tried searching for this answer on the Internet but I just cannot get my head around some formulas and wondering if someone has a simple solution for the below:

    I have a column that I type a date into, I then want the adjacent column to add two months to the date. This works fine on cells that I want to type into, but the blank cells that I leave (to add to later) are making the formula cell have a default date displayed. I want the +2 month column to ignore any blank cells and only display the +2 month date should a date be entered.

    Hopefully someone can help and I hope the above makes sense.

    I did try creating an IF formula, but it said A1 expects a boolean but cell A1 contains a date.

    Many thanks

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Ignoring a blank date cell

    Just use

    =IF(A2="","",DATE(YEAR(A2),MONTH(A2)+2,DAY(A2))

  3. #3
    Registered User
    Join Date
    01-23-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    3

    Re: Ignoring a blank date cell

    Thank you.

    It says the formula contains a syntax error

  4. #4
    Registered User
    Join Date
    01-23-2015
    Location
    UK
    MS-Off Ver
    2010
    Posts
    3

    Re: Ignoring a blank date cell

    Ignore that, it works! Thanks so much. I had to change A2 to A1.

    Thank you


    Sorry, my mistake it doesn't work!

    I have A1 with the date I want to type in and B1 the date that I want to +2 months as well as appear blank when nothing is entered into A1. I'm still getting an error.
    Last edited by icewithaslice; 01-23-2015 at 10:56 AM.

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Ignoring a blank date cell

    It needs another bracket at the end

    =IF(A2="","",DATE(YEAR(A2),MONTH(A2)+2,DAY(A2)))

+ 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. Ignoring blank cells using DATE formula
    By eliopaulos in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-27-2014, 10:05 PM
  2. Ignoring rows with a blank cell in one column
    By twomack1 in forum Excel General
    Replies: 11
    Last Post: 11-12-2014, 03:49 PM
  3. [SOLVED] Find minimum (ignoring blank cell or zero values) with Multiple Criteria
    By Joeywei in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-27-2013, 08:45 PM
  4. Ignoring Blank Cell w/ Conditional Formatting
    By AlanH in forum Excel General
    Replies: 5
    Last Post: 11-08-2012, 01:31 PM
  5. Move next value to the desired cell in a row ignoring blank cells in between
    By saeed9313 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-02-2012, 09:29 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