Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello from Steved
Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this:
Me.Range("C3,R3") = Now Biff "Steved" wrote in message ... Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello Biff from Steved
I tried ("C3,R3") but it is not working. "T. Valko" wrote: Try this: Me.Range("C3,R3") = Now Biff "Steved" wrote in message ... Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
It works for me.
Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3,R3") = Now End If Application.EnableEvents = True End If End With End Sub Biff "Steved" wrote in message ... Hello Biff from Steved I tried ("C3,R3") but it is not working. "T. Valko" wrote: Try this: Me.Range("C3,R3") = Now Biff "Steved" wrote in message ... Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
What does "it is not working" mean? Does *anything* get entered in C3?
R3? Do the wrong values get added? Does XL crash? When I try your code (using "C3,R3") it puts the date/time in both cell C3 and cell R3. What's different for you? In article , Steved wrote: I tried ("C3,R3") but it is not working. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Me.Range("C3,R3") = Now
Gord Dibben MS Excel MVP On Tue, 22 May 2007 19:44:01 -0700, Steved wrote: Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello Biff from Steved
When I put in Me.Range("C3,R3") = Now as instructed it did not work, however when I closed the workbook and then reopened it it worked. I am very sorry hopefully next time I will put the posted answer in my spreadsheet and close then reopen. Once again thankyou for your time. "T. Valko" wrote: It works for me. Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3,R3") = Now End If Application.EnableEvents = True End If End With End Sub Biff "Steved" wrote in message ... Hello Biff from Steved I tried ("C3,R3") but it is not working. "T. Valko" wrote: Try this: Me.Range("C3,R3") = Now Biff "Steved" wrote in message ... Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello Je from Steved
I closed the worksheet and reopened it and now works. My Fault. "JE McGimpsey" wrote: What does "it is not working" mean? Does *anything* get entered in C3? R3? Do the wrong values get added? Does XL crash? When I try your code (using "C3,R3") it puts the date/time in both cell C3 and cell R3. What's different for you? In article , Steved wrote: I tried ("C3,R3") but it is not working. |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello Gord form Steved
I was given the same formula by Biff earlier on but when I put it in it did not work, however on closing the worksheet and then reopening it worked. "Gord Dibben" wrote: Me.Range("C3,R3") = Now Gord Dibben MS Excel MVP On Tue, 22 May 2007 19:44:01 -0700, Steved wrote: Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
You shouldn't have to close then reopen for it to work. But I'm glad you got
it straightened out. Thanks for the feedback! Biff "Steved" wrote in message ... Hello Biff from Steved When I put in Me.Range("C3,R3") = Now as instructed it did not work, however when I closed the workbook and then reopened it it worked. I am very sorry hopefully next time I will put the posted answer in my spreadsheet and close then reopen. Once again thankyou for your time. "T. Valko" wrote: It works for me. Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3,R3") = Now End If Application.EnableEvents = True End If End With End Sub Biff "Steved" wrote in message ... Hello Biff from Steved I tried ("C3,R3") but it is not working. "T. Valko" wrote: Try this: Me.Range("C3,R3") = Now Biff "Steved" wrote in message ... Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Steve
Thanks for the feedback to all of us. Just for info................ This is event code, not a "formula". Gord On Wed, 23 May 2007 12:46:05 -0700, Steved wrote: Hello Gord form Steved I was given the same formula by Biff earlier on but when I put it in it did not work, however on closing the worksheet and then reopening it worked. "Gord Dibben" wrote: Me.Range("C3,R3") = Now Gord Dibben MS Excel MVP On Tue, 22 May 2007 19:44:01 -0700, Steved wrote: Hello from Steved Me.Range("C3") = Now is ok Me.Range("C3:R3") = Now but this will not work My objective is for it to Work in 2 Cells "C3" and "R3" is this possible please. Thankyou Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("A3:AB272"), .Cells) Is Nothing Then Application.EnableEvents = False If Not IsEmpty(.Value) Then Me.Range("C3:R3") = Now End If Application.EnableEvents = True End If End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
pictures to work with "data" "sort" option | Excel Discussion (Misc queries) | |||
Complex if test program possible? If "value" "value", paste "value" in another cell? | Excel Discussion (Misc queries) | |||
Insert "-" in text "1234567890" to have a output like this"123-456-7890" | Excel Discussion (Misc queries) |