Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 519
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Work in 2 Cells "C3" and "R3"

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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Work in 2 Cells "C3" and "R3"

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
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
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
pictures to work with "data" "sort" option arad Excel Discussion (Misc queries) 1 April 18th 06 09:15 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


All times are GMT +1. The time now is 06:14 AM.

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"