Seeking Automated or VBA procedure that automatically enters today's dates.....

Posted on 2014-08-14
Last Modified: 2014-08-17
Seeking A procedure that automatically enters today's date as the Actual Closeout Date when the related EPR value is changed to "Yes", or changes the Actual Closeout Date to "N/A" when the EPR closed value is "No" or "Blank".
Question by:cfhasan1
    LVL 26

    Expert Comment

    Please upload a sample.
    LVL 27

    Accepted Solution

    Yep, it would have been better to attach the latest version of the workbook.  But, here's the code that I think will work; it's inserted in the EPR sheet object in VBA:
    Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
        If Target.Column = 10 And Target.Row >= 3 And Target.Row <= 20 And Target.Rows.Count = 1 Then
            If Target.Value = "Yes" Then
                Target.Offset(0, 1).Value = Now()
                Target.Offset(0, 1).Value = "N/A"
            End If
        End If
    End Sub

    Open in new window

    Modified workbook attached.


    Author Closing Comment

    Worked out great!

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
    This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
    The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now