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 two consecutive maros

Hi, can this two macro codes work in the same sheet? Both codes are working
separately, but not together.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "B5" Then _
Range("C1").Value = IIf(IsEmpty(Target), "", "" &
UCase(Format(Date, "dddd dd.mm.yyyy")))

End Sub
--------------------------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 And Target.Cells.Row = 5 Then
N = Target.Row
If Me.Range("A" & N).Value < "" Then
With Me.Range("B" & N)
If .Value = "" Then
..Value = Now
End If
End With
End If
End If
enditall:
Application.EnableEvents = True
End Sub


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
Consecutive date range on consecutive worksheets john3478 Excel Worksheet Functions 3 January 14th 09 10:54 PM
Transposing data from consecutive rows into non-consecutive rows econ Excel Discussion (Misc queries) 0 March 10th 08 07:24 PM
Recording find Maros gwtechie72 New Users to Excel 1 January 23rd 08 10:09 PM
consecutive gotta know Excel Worksheet Functions 1 December 31st 06 10:34 PM
Consecutive Cells Stat Guy via OfficeKB.com Excel Worksheet Functions 1 May 26th 05 05:57 AM


All times are GMT +1. The time now is 04:37 PM.

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

About Us

"It's about Microsoft Excel"