+ Reply to Thread
Results 1 to 2 of 2

Thread: VBA for Automatic Date for multiple columns

  1. #1
    Registered User
    Join Date
    11-23-2011
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    1

    VBA for Automatic Date for multiple columns

    I have the following VBA code for a date to populate automatically when a data field is changed.

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("Y:AD")) Is Nothing Then
    Cells(Target.Row, 31) = Date
    End If
    End Sub

    My question is, how would I do this for more than one range and dates? For example, i need column AE to show that date if Y thru AD is changed, then I need column AH to show a date if fields AF thru AG are changed, etc...

  2. #2
    Forum Guru ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    traded up
    MS-Off Ver
    2003 & 2010
    Posts
    1,905

    Re: VBA for Automatic Date for multiple columns

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    “To sin by silence when they should protest makes cowards of men.” ~ Abraham Lincoln

+ 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.2.0