+ Reply to Thread
Results 1 to 10 of 10

Insert default date into blank cells in date column

  1. #1
    Registered User
    Join Date
    07-21-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS Excel 2010
    Posts
    54

    Insert default date into blank cells in date column

    Hi everyone, I have this column that lists dates in d/m/yyyy format. However some of the cells have no dates. How am I able to automatically insert a default date (e.g. 1/1/1111) into the blank cells of this date column? Any suggestions are much appreciated!

    defaultdate.PNG

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Insert default date into blank cells in date column

    Try this

    Please Login or Register  to view this content.
    See Attachment
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-21-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS Excel 2010
    Posts
    54

    Re: Insert default date into blank cells in date column

    Hi Thank you for the reply.

    Please Login or Register  to view this content.
    I like this, however, for this project specifically, some records don't have a date at all, for these I was thinking of inserting a "dummy date" just as a reminder to the user that, that record has no date (e.g. 1/1/1111). So instead of "=Today()" could something like "=1/1/1111" work? Also, I have a macro that was used previously to split various columns (thanks to DanielExcelVBA), would including new code like this potentially disrupt the present macro's functionality? Thank you.

    Please Login or Register  to view this content.
    Last edited by deleter; 07-31-2017 at 03:55 PM.

  4. #4
    Registered User
    Join Date
    07-21-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS Excel 2010
    Posts
    54

    Re: Insert default date into blank cells in date column

    Good morning. So I tried making the following edits but I keep getting an error saying Compile Error: Variable Not Defined with the word Cell being highlighted. Thoughts?


    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Insert default date into blank cells in date column

    Change the following

    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    As for the second (new) request, please open a new Thread

  6. #6
    Registered User
    Join Date
    07-21-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS Excel 2010
    Posts
    54

    Re: Insert default date into blank cells in date column

    Hi. Thank you for the reply. I made the change as you suggested but I get the same error. Variable not defined with Cell being highlighted.

  7. #7
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Insert default date into blank cells in date column

    Excel don't recognizes 1-1-1111 as a date.
    The first date in excel is 1-1-1900
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  8. #8
    Registered User
    Join Date
    07-21-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS Excel 2010
    Posts
    54

    Re: Insert default date into blank cells in date column

    Quote Originally Posted by popipipo View Post
    Excel don't recognizes 1-1-1111 as a date.
    The first date in excel is 1-1-1900
    Hi popipipo

    I changed to as follows

    Please Login or Register  to view this content.
    But same issue

  9. #9
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Insert default date into blank cells in date column

    I am unable to replicate your error (and I used both of our codes.)
    Pls attach a sample workbook which produce the error. thanks

  10. #10
    Registered User
    Join Date
    07-21-2017
    Location
    Toronto, Canada
    MS-Off Ver
    MS Excel 2010
    Posts
    54

    Re: Insert default date into blank cells in date column

    Never mind. I simple selected the column, hit "Find and Replace" and replaced any blanks with the dummy date value. Thank you anyway for all your help!

+ 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: 3
    Last Post: 09-13-2016, 10:14 AM
  2. [SOLVED] If formula, if two cells are blank, return blank, if one has a date, subtract todays date
    By amthyst826 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2014, 12:47 PM
  3. [SOLVED] count blank cells in one column based on date in different column
    By IreneADS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2014, 09:58 AM
  4. Replies: 1
    Last Post: 02-09-2012, 09:19 PM
  5. macro to highlight blank cells in row if date in column A
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-18-2011, 05:33 AM
  6. Replies: 5
    Last Post: 08-05-2009, 02:43 PM
  7. Replies: 2
    Last Post: 03-17-2009, 09:33 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