+ Reply to Thread
Results 1 to 2 of 2

Require a cell to be nonblank if another cell is nonblank

  1. #1
    Herb Wexler
    Guest

    Require a cell to be nonblank if another cell is nonblank

    If A1 has any value entered I want to require B1 to be filled in.

    For example if an employee puts ome thing in A1 I want them to put their
    name in B1.

    I'd also like to force todays date into C1

  2. #2
    Bob Phillips
    Guest

    Re: Require a cell to be nonblank if another cell is nonblank

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Column = 1 Then
    Target.Offset(0, 1) = Environ("Username")
    Target.Offset(0, 2) = Format(Date, "dd mmm yyyy")
    End If
    End Sub

    This is worksheet event code, which means that it needs to be
    placed in the appropriate worksheet code module, not a standard
    code module. To do this, right-click on the sheet tab, select
    the View Code option from the menu, and paste the code in.

    --

    HTH

    Bob Phillips

    (remove nothere from the email address if mailing direct)

    "Herb Wexler" <HerbWexler@discussions.microsoft.com> wrote in message
    news:6BB8F32B-D73E-4CBF-A512-C02FB800AFC8@microsoft.com...
    > If A1 has any value entered I want to require B1 to be filled in.
    >
    > For example if an employee puts ome thing in A1 I want them to put their
    > name in B1.
    >
    > I'd also like to force todays date into C1




+ 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