LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine cells with the same reference and combine quantities brandon Excel Discussion (Misc queries) 2 September 17th 08 05:44 PM
How do I combine MACROS and functions? Mr_Crowe New Users to Excel 1 July 9th 08 02:23 AM
Macros warning always shows up, even if all macros removed Joe M Excel Discussion (Misc queries) 1 December 20th 07 04:45 AM
combine two macros Lisa Excel Worksheet Functions 1 July 20th 06 02:10 AM
Training: More on how to use macros in Excel: Recording Macros ToriT Excel Worksheet Functions 2 February 10th 06 07:05 PM


All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"