Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Time Capture...

right click on the sheet tab and select view code. paste in this code

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

if you want to use a formula, you would need to have intentional circular
references. If that is what you want, post back.
--
Regards,
Tom Ogilvy

"Gordon Cartwright" wrote in message
...
Hi...

In cell A1 I want type the word yes and in Cell B1 a
formula that will return the exact date the word Yes was
entered.

Thanks in advance

Gordon.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Time Capture...

Tom...

How do I adjust this code to allow a range a1:a500 to be
return date values in b1:500 rather than just a1 and b1. I
should have asked this originally but I thought I could
manipulate the code but I'm still learning...thanks

Gordon.

-----Original Message-----
right click on the sheet tab and select view code. paste

in this code

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy

hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

if you want to use a formula, you would need to have

intentional circular
references. If that is what you want, post back.
--
Regards,
Tom Ogilvy

"Gordon Cartwright" wrote in

message
...
Hi...

In cell A1 I want type the word yes and in Cell B1 a
formula that will return the exact date the word Yes was
entered.

Thanks in advance

Gordon.



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Time Capture...

Private Sub Worksheet_Change(ByVal Target As Range)
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("A1:A500")) Is Nothing Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

for the entire column

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

--
Regards,
Tom Ogilvy

Gordon Cartwright wrote in message
...
Tom...

How do I adjust this code to allow a range a1:a500 to be
return date values in b1:500 rather than just a1 and b1. I
should have asked this originally but I thought I could
manipulate the code but I'm still learning...thanks

Gordon.

-----Original Message-----
right click on the sheet tab and select view code. paste

in this code

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy

hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

if you want to use a formula, you would need to have

intentional circular
references. If that is what you want, post back.
--
Regards,
Tom Ogilvy

"Gordon Cartwright" wrote in

message
...
Hi...

In cell A1 I want type the word yes and in Cell B1 a
formula that will return the exact date the word Yes was
entered.

Thanks in advance

Gordon.



.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Time Capture...

The previous had an extraneous declaration:

Right click on the sheet tab and select view code. Paste in one of the
below:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Not Intersect(Target, Range("A1:A500")) Is Nothing Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

for the entire column

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

--
Regards,
Tom Ogilvy


Gordon Cartwright wrote in message
...
Tom...

How do I adjust this code to allow a range a1:a500 to be
return date values in b1:500 rather than just a1 and b1. I
should have asked this originally but I thought I could
manipulate the code but I'm still learning...thanks

Gordon.

-----Original Message-----
right click on the sheet tab and select view code. paste

in this code

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Not IsEmpty(Target) Then
If UCase(Target.Value) = "YES" Then
Target.Offset(0, 1).Value = Now()
Target.Offset(0, 1).NumberFormat = "mm/dd/yyyy

hh:mm:ss"
Target.EntireColumn.AutoFit
End If
End If
End If
End Sub

if you want to use a formula, you would need to have

intentional circular
references. If that is what you want, post back.
--
Regards,
Tom Ogilvy

"Gordon Cartwright" wrote in

message
...
Hi...

In cell A1 I want type the word yes and in Cell B1 a
formula that will return the exact date the word Yes was
entered.

Thanks in advance

Gordon.



.



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
Time Capture friendlydue2000 Excel Discussion (Misc queries) 1 September 13th 10 06:58 AM
How do I capture a date? Capture a variable date & use with text Excel Discussion (Misc queries) 3 November 27th 08 02:40 AM
Excel screen capture to capture cells and row and column headings jayray Excel Discussion (Misc queries) 5 November 2nd 07 11:01 PM
Median of Even Set; How to Capture them? Mike Excel Discussion (Misc queries) 7 July 28th 05 01:24 PM
How do I capture the last saved time in Excel2003? [email protected] Excel Worksheet Functions 1 December 29th 04 07:40 PM


All times are GMT +1. The time now is 05:20 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"