+ Reply to Thread
Results 1 to 6 of 6

Auto Fill "Missing" based on two dates values

  1. #1
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Auto Fill "Missing" based on two dates values

    Hi All,

    I have two date columns.

    My requirement is, in the 2nd column word "Missing" should be filled if difference between [Today] and [Date in 1st column] is more than two days. Also user may enter some date value in 2nd column. In that case "Missing" should not be filled.

    I can use 1 or more columns for intermediate calculations.

    I have attached a sample file. In that cell "B3" should be auto-filled with "Missing" but not cells "B5"

    PLEASE have a look and help me!
    Attached Files Attached Files
    Last edited by Tejas.T; 10-31-2012 at 02:37 AM.

  2. #2
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Auto Fill "Missing" based on two dates values

    Hi Tejas,

    The formula would be something like -

    Please Login or Register  to view this content.
    Please note you cannot have both a formula and a user inputted value in the same cell. If a user manually inputs a date then the formula will be lost.

    Hope that helps

    Dave H
    - Mark your post [SOLVED] if it has been answered satisfactorily, by editing your original post using advanced mode.
    - Thank those that provided useful help, its nice and its very well appreciated...use the star on the lower left of the post

  3. #3
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Auto Fill "Missing" based on two dates values

    Hi Dave H,

    Thank you very much. Formula is correct and also it avoided circular reference issue.

    I modified it little bit to avoid filling "Missing" if Cell in column A is blank

    Please Login or Register  to view this content.
    I also know macro. So I think in Cell change event I can check if user has deleted the cell content I can re-fill this formula again in that particular cell.

    I can do to that extent. But don't know how to handle if user deletes a Range which contains some cells from column B.

    Can you please help in that?

  4. #4
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Auto Fill "Missing" based on two dates values

    Probably not the most efficient code but try this -

    Please Login or Register  to view this content.
    Try it out before considering calling it from the worksheet change event.

    Hope that helps.

    Dave H

  5. #5
    Forum Contributor
    Join Date
    10-21-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    110

    Re: Auto Fill "Missing" based on two dates values

    Thank you.

    But now I think the better way would be to provide two columns.

    Hey do you know how to hide/password protect the formula bar? So that user can not see the formula I have used.

  6. #6
    Forum Contributor Dave H9's Avatar
    Join Date
    03-10-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    418

    Re: Auto Fill "Missing" based on two dates values

    Hi Tejas,

    Hope you are sorted on the "Auto Fill" problem. If so please mark this thread as solved and start a new thread for your new question.

    Many thanks

    Dave H

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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