+ Reply to Thread
Results 1 to 5 of 5

Username stamp when cell change

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-01-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    163

    Username stamp when cell change

    Hi,
    I was and tried many codes to stamp username in column N when column M is changed. None of thoes codes runs when I made change on column N.
    Would anyone kindly help?

    I put the code in sheet2.
    Private Sub Worksheet_Change(ByVal Target As Range)
    
        If (Target.Column = 13) Then
            Cells(Target.Row, 14).Value = Application.UserName
            
        End If
    End Sub

  2. #2
    Forum Contributor
    Join Date
    08-26-2014
    Location
    Finland
    MS-Off Ver
    365
    Posts
    199

    Re: Username stamp when cell change

    Have you enabled macros? Have you checked that you actually have a valid username in application.username? Your code works fine on my end.

    You can also try this code, it will use windows login username.

    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        If (Target.Column = 13) Then
            Cells(Target.Row, 14).Value = Environ("UserName")
        End If
    End Sub

  3. #3
    Forum Contributor
    Join Date
    02-01-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    163

    Re: Username stamp when cell change

    Hi,

    This is so great. It works now.
    THank you very much for your help.

  4. #4
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Username stamp when cell change

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
    
    If Intersect(Target, Range("m:m")) Is Nothing Then Exit Sub
    If Target.Cells.Count > 1 Then Exit Sub
    Target.Cells.Offset(0, 1).Value = Application.UserName
    
    End Sub

  5. #5
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,286

    Re: Username stamp when cell change

    Thanks for rep

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] lock after edit each cell in column L to Q and stamp date and username in column R and S
    By Norlina Deli in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-09-2019, 06:59 AM
  2. Code issue for username stamp
    By Tanakaka in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-19-2017, 04:41 AM
  3. [SOLVED] VBA and Macros / Autopopulating Date Stamp and username
    By akaytie in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 11-14-2014, 02:32 PM
  4. Username/Data/Time Stamp
    By KCKuhns92 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2014, 03:06 PM
  5. Trouble with a date and username stamp macro
    By msantucci in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2014, 12:17 PM
  6. Stamp Username, Time & Date
    By djfatboyfats in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-15-2007, 07:27 PM
  7. Username & Date/Time Stamp
    By Ken D in forum Excel General
    Replies: 4
    Last Post: 03-19-2006, 10:25 AM

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