Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default auto fill current time

I need help with this one, I can't find (figure out) the answer myself.
I have a worksheet that use at work, I want to automatically place the
current time into a cell, whenever I place data into the cell 3 rows up. I
want this 'time cell' to automatically update every time I enter data into
the cell 3 rows up. I already know the shortcut to add time to a cell. That's
not what I'm looking for here. Please advise.
--
Thanks very much, Appreciate you!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default auto fill current time

So, if you enter something in A1 then you want A4 to update with the time?

Try this event macro:

Right click the sheet tab and select View code. Paste the code below into
the window that opens.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
With Target
If .Value < "" Then
Range("A4").Value = Format(Now, "h:mm AM/PM")
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub


Close the window to return to Excel.


--
Biff
Microsoft Excel MVP


"glaw" wrote in message
...
I need help with this one, I can't find (figure out) the answer myself.
I have a worksheet that use at work, I want to automatically place the
current time into a cell, whenever I place data into the cell 3 rows up. I
want this 'time cell' to automatically update every time I enter data into
the cell 3 rows up. I already know the shortcut to add time to a cell.
That's
not what I'm looking for here. Please advise.
--
Thanks very much, Appreciate you!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default auto fill current time

THANK YOU VERY MUCH!

It worked great.
Now for a follow up question. I need to repeat this process across 14
consecutive columns. What is the easiest way to do this?
--
Thanks very much, Appreciate you!


"T. Valko" wrote:

So, if you enter something in A1 then you want A4 to update with the time?

Try this event macro:

Right click the sheet tab and select View code. Paste the code below into
the window that opens.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
With Target
If .Value < "" Then
Range("A4").Value = Format(Now, "h:mm AM/PM")
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub


Close the window to return to Excel.


--
Biff
Microsoft Excel MVP


"glaw" wrote in message
...
I need help with this one, I can't find (figure out) the answer myself.
I have a worksheet that use at work, I want to automatically place the
current time into a cell, whenever I place data into the cell 3 rows up. I
want this 'time cell' to automatically update every time I enter data into
the cell 3 rows up. I already know the shortcut to add time to a cell.
That's
not what I'm looking for here. Please advise.
--
Thanks very much, Appreciate you!




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default auto fill current time

Assume the 14 columns are A:N

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:N1")) Is Nothing Then
With Target
If .Value < "" Then
Target.Offset(3, 0).Value = Format(Now, "h:mm AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub


--
Biff
Microsoft Excel MVP


"glaw" wrote in message
...
THANK YOU VERY MUCH!

It worked great.
Now for a follow up question. I need to repeat this process across 14
consecutive columns. What is the easiest way to do this?
--
Thanks very much, Appreciate you!


"T. Valko" wrote:

So, if you enter something in A1 then you want A4 to update with the
time?

Try this event macro:

Right click the sheet tab and select View code. Paste the code below into
the window that opens.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
With Target
If .Value < "" Then
Range("A4").Value = Format(Now, "h:mm AM/PM")
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub


Close the window to return to Excel.


--
Biff
Microsoft Excel MVP


"glaw" wrote in message
...
I need help with this one, I can't find (figure out) the answer myself.
I have a worksheet that use at work, I want to automatically place the
current time into a cell, whenever I place data into the cell 3 rows
up. I
want this 'time cell' to automatically update every time I enter data
into
the cell 3 rows up. I already know the shortcut to add time to a cell.
That's
not what I'm looking for here. Please advise.
--
Thanks very much, Appreciate you!






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default auto fill current time

I now have an additional problem to add to this. I need to add a second line
of auto complete time in the same sheet. I need to auto add time to
(B52:O52), when I add data to (B51:O51). I've tried to do this myself but I
don't know how. Please help.
--
Thanks very much, Appreciate you!


"T. Valko" wrote:

Assume the 14 columns are A:N

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:N1")) Is Nothing Then
With Target
If .Value < "" Then
Target.Offset(3, 0).Value = Format(Now, "h:mm AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub


--
Biff
Microsoft Excel MVP


"glaw" wrote in message
...
THANK YOU VERY MUCH!

It worked great.
Now for a follow up question. I need to repeat this process across 14
consecutive columns. What is the easiest way to do this?
--
Thanks very much, Appreciate you!


"T. Valko" wrote:

So, if you enter something in A1 then you want A4 to update with the
time?

Try this event macro:

Right click the sheet tab and select View code. Paste the code below into
the window that opens.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
With Target
If .Value < "" Then
Range("A4").Value = Format(Now, "h:mm AM/PM")
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub


Close the window to return to Excel.


--
Biff
Microsoft Excel MVP


"glaw" wrote in message
...
I need help with this one, I can't find (figure out) the answer myself.
I have a worksheet that use at work, I want to automatically place the
current time into a cell, whenever I place data into the cell 3 rows
up. I
want this 'time cell' to automatically update every time I enter data
into
the cell 3 rows up. I already know the shortcut to add time to a cell.
That's
not what I'm looking for here. Please advise.
--
Thanks very much, Appreciate you!








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default auto fill current time

Editing Biff's code...........

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("B51:O51")) Is Nothing Then
With Target
If .Value < "" Then
Target.Offset(1, 0).Value = Format(Now, "h:mm AM/PM")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On Tue, 30 Sep 2008 17:57:00 -0700, glaw
wrote:

I now have an additional problem to add to this. I need to add a second line
of auto complete time in the same sheet. I need to auto add time to
(B52:O52), when I add data to (B51:O51). I've tried to do this myself but I
don't know how. Please help.


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
How to make excel auto fill in date and current time [email protected] Excel Discussion (Misc queries) 6 April 3rd 23 04:25 PM
Auto-populate, Auto-copy or Auto-fill? Jay S. Excel Worksheet Functions 4 August 10th 07 09:04 PM
Having the current time inserted w/o updating the current time sherobot Excel Worksheet Functions 2 October 2nd 06 05:05 PM
using auto fill edit or fill handel fill handle or auto fill Excel Worksheet Functions 0 February 10th 06 07:01 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM


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