Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Excel Macro.

Options
  • 22-05-2006 9:55am
    #1
    Registered Users Posts: 624 ✭✭✭


    hi guys,

    can anyone help here.. i think this is a farily easy request. but its been a long time since i wrote any VB code.

    All i want to do is in excel, when the text in A1 is changed the text in E1 will be changed to the time the CELL A1 was modified.

    i will need this to apply to all CELLS e.g. changing A1 will place the time in E1, changing A2 place the time in E2 , A3 -E3 etc...

    thanks for your help!


Comments

  • Registered Users Posts: 683 ✭✭✭Gosh


    Private Sub Worksheet_Change(ByVal Target As Range)
      If Target.Column <> 1 Then Exit Sub
      If IsEmpty(Target(1)) Then Exit Sub
      If Target.Row = 1 Then Exit Sub
      If IsEmpty(Target.Offset(0, 4)) Then
        Target.Offset(0, 4) = Time
      End If
    End Sub
    


  • Registered Users Posts: 624 ✭✭✭lazygit


    thanks so much mate :) perfect!


Advertisement