#1   Report Post  
Posted to microsoft.public.excel.misc
sigfreund
 
Posts: n/a
Default Auto date entry?


Can I have the time entered into cell a1 automatically by entering a
value into b1 or c1, if so how can I have this continue down the entire
colum. I am stuck in a hospital bed and need to figure out an easy way
to track some fluid ins and outs and keep a running total. Thanks


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile: http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518500

  #2   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default Auto date entry?

not sure if this is what you want; this is code for enter anything in a
specified cell in "1 line", get date in different cell same line. this
example has a couple of items added: uses range, exit if less than certain
row (header), exit lines not to be figured (that have a "." in first cell in
line); Destination Cell A, for changes made in
B or C.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Target.Row < 91 Then Exit Sub
If Me.Cells(.Row, "A").Value = "." Then Exit Sub
If Not Intersect(Me.Range("B:C"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Me.Cells(.Row, "A")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
End With
End Sub


"sigfreund" wrote:


Can I have the time entered into cell a1 automatically by entering a
value into b1 or c1, if so how can I have this continue down the entire
colum. I am stuck in a hospital bed and need to figure out an easy way
to track some fluid ins and outs and keep a running total. Thanks


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile: http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518500


  #3   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default Auto date entry?

2 date example below: date format for view I chose was dd, you can use any
combination of: yymmdd hh:mm:ss

enter code by Right-Click worksheet tab at bottom, View Code, & paste to
worksheet window provided, CLICK SAVE.

anytime you move columns around, you will have to modify this code to suite.

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Target.Row < 90 Then Exit Sub
If Me.Cells(.Row, "A").Value = "." Then Exit Sub
If Not Intersect(Me.Range("B:C"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Me.Cells(.Row, "A")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
If Not Intersect(Me.Range("E:F"), .Cells) Is Nothing Then
Application.EnableEvents = False
With Me.Cells(.Row, "D")
.NumberFormat = "dd"
.Value = Now
End With
Application.EnableEvents = True
End If
End With
End Sub


"sigfreund" wrote:


Can I have the time entered into cell a1 automatically by entering a
value into b1 or c1, if so how can I have this continue down the entire
colum. I am stuck in a hospital bed and need to figure out an easy way
to track some fluid ins and outs and keep a running total. Thanks


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile: http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518500


  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Auto date entry?

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

On Error GoTo ws_exit
Application.EnableEvents = False
With Target
If .Column = 1 Then
.Offset(0, 1).Value = Time
.Offset(0, 1).NumberFormat = "hh:mm:ss"
End If
End With

ws_exit:
Application.EnableEvents = True
End Sub


This is worksheet event code, which means that it needs to be
placed in the appropriate worksheet code module, not a standard
code module. To do this, right-click on the sheet tab, select
the View Code option from the menu, and paste the code in.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"sigfreund" wrote
in message ...

Can I have the time entered into cell a1 automatically by entering a
value into b1 or c1, if so how can I have this continue down the entire
colum. I am stuck in a hospital bed and need to figure out an easy way
to track some fluid ins and outs and keep a running total. Thanks


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile:

http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518500



  #5   Report Post  
Posted to microsoft.public.excel.misc
nastech
 
Posts: n/a
Default Auto date entry?

thought you might be interested, the conditional formatting I use for 3
different colors a (A4: x or y, are over-rides; a5 6 7 are x days out: 30
20 10..; purple, lite purple, yellow; lime green for column fades date to
back ground if ok)


=IF(OR(A9="",$A$4="x"),"",(TODAY()+1)(A9+A$5))
=IF(OR(A9="",$A$4="x"),"",(TODAY()+1)(A9+A$6))
=IF(OR(AND(J9="",AT9=""),$A$4="x",$A$4="z"),"",OR( A9="",(TODAY()+1)(A9+A$7)))

"sigfreund" wrote:


Can I have the time entered into cell a1 automatically by entering a
value into b1 or c1, if so how can I have this continue down the entire
colum. I am stuck in a hospital bed and need to figure out an easy way
to track some fluid ins and outs and keep a running total. Thanks


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile: http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518500


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 ?Excel chart auto insert /populate a code based on date MikeR-Oz New Users to Excel 6 December 22nd 05 12:16 PM
Auto Protecting cells & auto filling date ccarmock Excel Discussion (Misc queries) 7 September 30th 05 09:21 PM
Auto Date Lyali Excel Worksheet Functions 3 April 30th 05 09:13 PM
Auto entry of "=" before dates lg Excel Worksheet Functions 2 January 28th 05 01:13 AM
Auto date changing in Excel is maddening brhicks Charts and Charting in Excel 3 December 16th 04 02:54 PM


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