Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Current date and time when different cell = X

I'm trying to track manfacturing productivity between day and swing shifts.
I was hoping there was a function that would give the current date and time
WHEN a cell = x which will designate a task is complete. I've got a list of
tasks that are performed and as I mark them off as complete with an "x" I
would like a different column to display the date and time that each one is
checked off instead of manually entering this as things are completed. Help
anyone?

Thanks in advance...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 903
Default Current date and time when different cell = X

You would want to use an event macro
http://www.mvps.org/dmcritchie/excel/event.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Workaholic" wrote in message ...
I'm trying to track manfacturing productivity between day and swing shifts.
I was hoping there was a function that would give the current date and time
WHEN a cell = x which will designate a task is complete. I've got a list of
tasks that are performed and as I mark them off as complete with an "x" I
would like a different column to display the date and time that each one is
checked off instead of manually entering this as things are completed. Help
anyone?

Thanks in advance...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 860
Default Current date and time when different cell = X

Hi workaholic,

As David said, to automate the procedure you would need
a macro, however, there is keyboard shortcuts that can
do this.

Ctrl+; will input the date
Ctrl+Shift+; will input the time
Ctrl+; Space Ctrl+Shift+; will input the date and time

They aren't volatile so the time and date will stick.

HTH
Martin


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Current date and time when different cell = X

Thanks. I'm new to macros and VB. I found the macro to enter just the date.
That worked. I just need to find one that does both date and time. The
other question is, how do I specify which cells this applies to. The macro I
find was general. I tested it in a blank worksheet but I actually want to
use it on a worksheet with other data that won't be effected. Thanks again.
Please advise. Here's the macro. How do I specify the cells?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column < 1 Then Exit Sub
If IsEmpty(Target(1)) Then Exit Sub '-- also rejects if entire row cleared
If Target.row = 1 Then Exit Sub
If IsEmpty(Target.Offset(0, 1)) Then
Target.Offset(0, 1) = Date
Target.Offset(0, 1).NumberFormat = "yyyy-mm-dd"
End If
End Sub



"MartinW" wrote:

Hi workaholic,

As David said, to automate the procedure you would need
a macro, however, there is keyboard shortcuts that can
do this.

Ctrl+; will input the date
Ctrl+Shift+; will input the time
Ctrl+; Space Ctrl+Shift+; will input the date and time

They aren't volatile so the time and date will stick.

HTH
Martin



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
current Date and time in cell Alex01 Excel Discussion (Misc queries) 3 February 24th 06 09:22 PM
how do I insert the current time (static) and date in a cell? DF Excel Discussion (Misc queries) 5 October 28th 05 05:54 PM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 02:48 AM
Combined date time cell to separate date & time components Mark Ada Excel Discussion (Misc queries) 1 December 2nd 04 12:07 AM
Combined date time cell to separate date & time components Mark Ada Excel Worksheet Functions 1 December 2nd 04 12:04 AM


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