+ Reply to Thread
Results 1 to 2 of 2

Enter date in column L if value is entered in column B

  1. #1
    Mikus
    Guest

    Enter date in column L if value is entered in column B

    I need macro that would enter date in column L if ANY value is entered in
    column B

    I think this code of Dave Peterson could be modified to acomplish this task

    With Target
    If .Cells.Count > 1 Then Exit Sub 'one cell at a time
    If Intersect(.Cells, Me.Range("b:b")) Is Nothing Then Exit Sub

    On Error GoTo errHandler:

    If IsNumeric(.Value) Then
    '.Style = "Percent"
    If .Value = 1 Then
    Application.EnableEvents = False
    With .Offset(0, 3)
    .Value = Now
    .NumberFormat = "mm/dd/yyyy hh:mm:ss"
    End With
    End If
    End If
    End With

    errHandler:
    Application.EnableEvents = True

    End Sub


  2. #2
    Don Guillett
    Guest

    Re: Enter date in column L if value is entered in column B

    you shouldn't need to start a new thread for this continuation question.

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Mikus" <[email protected]> wrote in message
    news:[email protected]...
    > I need macro that would enter date in column L if ANY value is entered in
    > column B
    >
    > I think this code of Dave Peterson could be modified to acomplish this

    task
    >
    > With Target
    > If .Cells.Count > 1 Then Exit Sub 'one cell at a time
    > If Intersect(.Cells, Me.Range("b:b")) Is Nothing Then Exit Sub
    >
    > On Error GoTo errHandler:
    >
    > If IsNumeric(.Value) Then
    > '.Style = "Percent"
    > If .Value = 1 Then
    > Application.EnableEvents = False
    > With .Offset(0, 3)
    > .Value = Now
    > .NumberFormat = "mm/dd/yyyy hh:mm:ss"
    > End With
    > End If
    > End If
    > End With
    >
    > errHandler:
    > Application.EnableEvents = True
    >
    > End Sub
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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