Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11   Report Post  
Old September 30th 09, 08:21 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 2,646
Default Get current time NOW() but stop it updating

Install this Change event macro (first format columns C to the desired time
format):

Open VBA (Alt+F11)!
Right click on your worksheet name in the Project explorer window!
Select View code from the popup menu!
Copy/Paste macro code below in the code window!

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <= 2 Then 'columns A and B
Range("C" & Target.Row) = Time - TimeSerial(Range("A" & Target.Row),
Range("B" & Target.Row), 0)
Range("D" & Target.Row) = Time
End If
End Sub

Regards,
Stefi


„goneil” ezt *rta:

Hi Stefi,

Thank you for your response, much appreciated. I think this may not be
possible and perhaps thats why I cant figure it out on my own (I also don't
know VBA) or with community help.

I have a spreadsheet that I want to record how much time I spend on each
call I make or receive. I need to do it efficiently because I may only spend
1 or 2 minutes on some calls or less but rounded up to a minimum 1 minute.

I want to simply enter the Duration of the call and Nothing Else:

1. Enter call Duration hh mm into separate cells, then populate other cells
by:
2. Get the Current Time
3. Subtract the call duration from Current Time
4. And that becomes my Start Time.

The problem is that the end time keeps updating because it gets the current
timestamp from NOW().

A B C D
Duration -----------Time---------
Hours Mins Start End
1 20 9:40 11:00
(NOW - Duration) (NOW)

Any ideas Stefi?
cheers
George

"Stefi" wrote:

You can do that via a VBA event macro, but first you have to specify
1. in what cell do you want to enter NOW
2. what is the event (e.g. filling in a particular cell) triggering time
stamping.

Regards,
Stefi

„goneil” ezt *rta:

I want to time stamp a cell automatically with the current time (ie) without
the data entry operator having to do anything, however I don't want it to
update all the time I want it to just remain as is permenantly. I cannot
make NOW() stay the same.
Cheers



  #12   Report Post  
Old October 1st 09, 04:40 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2009
Posts: 5
Default Get current time NOW() but stop it updating

Great result Stefi, thank you.
George

"Stefi" wrote:

Install this Change event macro (first format columns C to the desired time
format):

Open VBA (Alt+F11)!
Right click on your worksheet name in the Project explorer window!
Select View code from the popup menu!
Copy/Paste macro code below in the code window!

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <= 2 Then 'columns A and B
Range("C" & Target.Row) = Time - TimeSerial(Range("A" & Target.Row),
Range("B" & Target.Row), 0)
Range("D" & Target.Row) = Time
End If
End Sub

Regards,
Stefi


„goneil” ezt *rta:

Hi Stefi,

Thank you for your response, much appreciated. I think this may not be
possible and perhaps thats why I cant figure it out on my own (I also don't
know VBA) or with community help.

I have a spreadsheet that I want to record how much time I spend on each
call I make or receive. I need to do it efficiently because I may only spend
1 or 2 minutes on some calls or less but rounded up to a minimum 1 minute.

I want to simply enter the Duration of the call and Nothing Else:

1. Enter call Duration hh mm into separate cells, then populate other cells
by:
2. Get the Current Time
3. Subtract the call duration from Current Time
4. And that becomes my Start Time.

The problem is that the end time keeps updating because it gets the current
timestamp from NOW().

A B C D
Duration -----------Time---------
Hours Mins Start End
1 20 9:40 11:00
(NOW - Duration) (NOW)

Any ideas Stefi?
cheers
George

"Stefi" wrote:

You can do that via a VBA event macro, but first you have to specify
1. in what cell do you want to enter NOW
2. what is the event (e.g. filling in a particular cell) triggering time
stamping.

Regards,
Stefi

„goneil” ezt *rta:

I want to time stamp a cell automatically with the current time (ie) without
the data entry operator having to do anything, however I don't want it to
update all the time I want it to just remain as is permenantly. I cannot
make NOW() stay the same.
Cheers


  #13   Report Post  
Old November 1st 13, 05:13 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Nov 2013
Posts: 1
Default Get current time NOW() but stop it updating

On Tuesday, September 29, 2009 7:29:01 AM UTC-4, Ms-Exl-Learner wrote:
Try this.

Past the below code in Excel VBA Module and assign shortcut key for that.

Press ALT+F11 and go to Insert and click Module. And paste the below code.

Sub DateandTime()
ActiveCell = Now()
End Sub

After pasting the code close the VBA and press ALT+F8, the DateandTime Macro
will appear. Just select it and select Options and give your desired
keyboard button as shortcut key to run the macro.

If you want to show the cells including seconds just select the cells and
Goto Format and select custom and paste this format [$-409]m/d/yy h:mm:ss
AM/PM;@

If this post helps, Click Yes!

--------------------
(MS-Exl-Learner)
--------------------




"goneil" wrote:

I want to time stamp a cell automatically with the current time (ie) without
the data entry operator having to do anything, however I don't want it to
update all the time I want it to just remain as is permenantly. I cannot
make NOW() stay the same.
Cheers



Worked like a charm, thanks
  #14   Report Post  
Old September 3rd 17, 02:49 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2017
Posts: 1
Default Get current time NOW() but stop it updating

But its not formula.
  #15   Report Post  
Old November 11th 17, 06:15 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Nov 2017
Posts: 1
Default Get current time NOW() but stop it updating

On Tuesday, September 29, 2009 at 3:21:01 PM UTC+5:30, trip_to_tokyo wrote:
From MS documentation:-

to insert the current date and time, press CTRL+; (semi-colon), then press
SPACE, and then press CTRL+SHIFT+; (semi-colon).

Please hit Yes if my comments have helped.

Thanks!



"goneil" wrote:

I want to time stamp a cell automatically with the current time (ie) without
the data entry operator having to do anything, however I don't want it to
update all the time I want it to just remain as is permenantly. I cannot
make NOW() stay the same.
Cheers



There is not CTRL key in ipad.


  #16   Report Post  
Old April 24th 18, 07:41 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2018
Posts: 1
Default Get current time NOW() but stop it updating

On Tuesday, September 29, 2009 at 3:02:01 PM UTC+5:30, goneil wrote:
I want to time stamp a cell automatically with the current time (ie) without
the data entry operator having to do anything, however I don't want it to
update all the time I want it to just remain as is permenantly. I cannot
make NOW() stay the same.
Cheers


I have a similar query. I want to generate a timestamp in Column C whenever someone enters any complaint in Column B.
So I have used this formula in all the cells of Column C
"=IF(B3="","",TEXT(NOW(),"dd/mm/yy/hh:mm"))"

But the problem is that the timestamp keep getting updated. I want to lock it down to the initial timestamp.
Can you suggest any code for this?
Thanks

--

<https://www.somaiya.edu* * * * <http://www.somaiya-ayurvihar.org*
<http://nareshwadi.org* <http://somaiya.com* <http://www.helpachild.in*
<http://nareshwadi.org
  #17   Report Post  
Old April 2nd 19, 04:01 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2019
Posts: 1
Default Get current time NOW() but stop it updating

On Tuesday, April 24, 2018 at 1:41:39 AM UTC-5, wrote:
On Tuesday, September 29, 2009 at 3:02:01 PM UTC+5:30, goneil wrote:
I want to time stamp a cell automatically with the current time (ie) without
the data entry operator having to do anything, however I don't want it to
update all the time I want it to just remain as is permenantly. I cannot
make NOW() stay the same.
Cheers


I have a similar query. I want to generate a timestamp in Column C whenever someone enters any complaint in Column B.
So I have used this formula in all the cells of Column C
"=IF(B3="","",TEXT(NOW(),"dd/mm/yy/hh:mm"))"

But the problem is that the timestamp keep getting updated. I want to lock it down to the initial timestamp.
Can you suggest any code for this?
Thanks

--

<https://www.somaiya.edu* * * * <http://www.somaiya-ayurvihar.org*
<http://nareshwadi.org* <http://somaiya.com* <http://www.helpachild.in*
<http://nareshwadi.org


Has anyone come up for a solution to this one? I would also like to do the same. I would like to enter a callers name into column C, then have the NOW time populate into column B. currently this works but it will update. I would like to know how to eliminate the updating.
  #18   Report Post  
Old April 2nd 19, 07:30 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jun 2007
Posts: 229
Default Get current time NOW() but stop it updating

On Tuesday, April 2, 2019 at 11:02:03 AM UTC-4, wrote:
On Tuesday, April 24, 2018 at 1:41:39 AM UTC-5, wrote:
On Tuesday, September 29, 2009 at 3:02:01 PM UTC+5:30, goneil wrote:
I want to time stamp a cell automatically with the current time (ie) without
the data entry operator having to do anything, however I don't want it to
update all the time I want it to just remain as is permenantly. I cannot
make NOW() stay the same.
Cheers


I have a similar query. I want to generate a timestamp in Column C whenever someone enters any complaint in Column B.
So I have used this formula in all the cells of Column C
"=IF(B3="","",TEXT(NOW(),"dd/mm/yy/hh:mm"))"

But the problem is that the timestamp keep getting updated. I want to lock it down to the initial timestamp.
Can you suggest any code for this?
Thanks

--

<https://www.somaiya.edu* * * * <http://www.somaiya-ayurvihar.org*
<http://nareshwadi.org* <http://somaiya.com* <http://www.helpachild.in*
<http://nareshwadi.org


Has anyone come up for a solution to this one? I would also like to do the same. I would like to enter a callers name into column C, then have the NOW time populate into column B. currently this works but it will update. I would like to know how to eliminate the updating.


One solution without VBA is to use circular reference to stop the cell from calculating. For example, in cell A1:

=IF(A1=0, NOW(), A1)

But you have to have circular references turned out, which might slow down calculations and cause unintended consequences.
  #19   Report Post  
Old April 7th 19, 07:17 AM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Apr 2019
Posts: 1
Default Get current time NOW() but stop it updating

I think this will work if I am correctly understanding what is trying to be done:


Cells(1, 1).value = now()


This should time stamp cell A1 and not update. It would just need to be used as a macro or as part of a macro.


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
Is there a formula which returns the current (updating) year? George Parrog Excel Discussion (Misc queries) 2 April 13th 09 09:54 AM
Updating with current date Gloria Lewis Excel Discussion (Misc queries) 0 February 26th 08 08:55 PM
How to Input date & Time [NOW()], then stop it updating? jonathandr Excel Worksheet Functions 3 October 23rd 06 05:41 PM
Having the current time inserted w/o updating the current time sherobot Excel Worksheet Functions 2 October 2nd 06 05:05 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 11:11 AM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017