Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
combine two macros
Hi, i need this two macros in the same sheet.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 6 Then Cells(Target.Row + 1, "B").Select ElseIf Target.Column 1 And Target.Column < 6 Then Cells(Target.Row, Target.Column + 1).Select End If End Sub --------------------------------------------------------- Private Sub Worksheet_Change(ByVal Target As Excel.Range) 'when entering data in a cell in Col B On Error GoTo enditall If Target.Address(False, False) = "C5" Then Range("C1").Value = IIf(IsEmpty(Target), "", "" & UCase(Format(Date, "dddd dd.mm.yyyy"))) ElseIf Target.Cells.Column = 2 And Target.Cells.Row = 5 Then Application.EnableEvents = False N = Target.Row If Me.Range("A" & N).Value < "" Then With Me.Range("G" & N) If .Value = "" Then ..Value = Now End If End With End If Application.EnableEvents = True End If enditall: End Sub How can i make this two macros work together? How can i combine this macros? Can this be done? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combine cells with the same reference and combine quantities | Excel Discussion (Misc queries) | |||
How do I combine MACROS and functions? | New Users to Excel | |||
Macros warning always shows up, even if all macros removed | Excel Discussion (Misc queries) | |||
combine two macros | Excel Worksheet Functions | |||
Training: More on how to use macros in Excel: Recording Macros | Excel Worksheet Functions |