Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I set the time in Excel

I have set up a formula in Excel to record the time for riders in a bike race
who are doing a number of laps. Each time they come over the line I want to
put their race number in to a cell and for Excel to record the time. I have
successfully created a formula to do this (if the value of the cell into
which I put the race number is 0 the time is inserted into another cell).
However, once the time has been inserted I don't want it to change when I put
another race number in to the cell below. Does anyone know how I can do this?
Sarah
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default How do I set the time in Excel

I assume you are using the NOW function. Yes, that will cause the time to
change everytime the sheet is calculated. You can use teh NOW function to
first enter the time, but then you will want to immediately copy and paste
values the time so that it doesn't change. You would have to do this with a
macro if you want it to happen automatically. Put the code in the change
event of the worksheet you are using.

"Girlie Bloat" wrote:

I have set up a formula in Excel to record the time for riders in a bike race
who are doing a number of laps. Each time they come over the line I want to
put their race number in to a cell and for Excel to record the time. I have
successfully created a formula to do this (if the value of the cell into
which I put the race number is 0 the time is inserted into another cell).
However, once the time has been inserted I don't want it to change when I put
another race number in to the cell below. Does anyone know how I can do this?
Sarah

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default How do I set the time in Excel

Hi Sarah,

http://www.mcgimpsey.com/excel/timestamp.html


--
Kind regards,

Niek Otten

"Girlie Bloat" wrote in message ...
|I have set up a formula in Excel to record the time for riders in a bike race
| who are doing a number of laps. Each time they come over the line I want to
| put their race number in to a cell and for Excel to record the time. I have
| successfully created a formula to do this (if the value of the cell into
| which I put the race number is 0 the time is inserted into another cell).
| However, once the time has been inserted I don't want it to change when I put
| another race number in to the cell below. Does anyone know how I can do this?
| Sarah


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default How do I set the time in Excel

If I understand your question correctly you are using the now() function in
your spreadsheet and the problem is that every time you add a new rider, the
now function re-evaluates to the current time for all of the cells. You want
the time to stick once you have enetered the rider? The problem is that Now()
is volatile and changes every time the claculation runs. My solution would be
to add a standard code module (record any macro to do anything and it will
insert a standard cde module called Module1, ...) In that module add the
following code.

Public Function RightNow() As Date
RightNow = Now()
End Function

This will make a non-volatile version of the now() function called
rightnow() that you can use in place of the now function, something like...

=IF(A10, rightnow(), "")
Where your rider number is in Cell A1
--
HTH...

Jim Thomlinson


"Girlie Bloat" wrote:

I have set up a formula in Excel to record the time for riders in a bike race
who are doing a number of laps. Each time they come over the line I want to
put their race number in to a cell and for Excel to record the time. I have
successfully created a formula to do this (if the value of the cell into
which I put the race number is 0 the time is inserted into another cell).
However, once the time has been inserted I don't want it to change when I put
another race number in to the cell below. Does anyone know how I can do this?
Sarah

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default How do I set the time in Excel

If you want to use a formula, you would need to go to
Tools=Options=Calculation tab and click the iterations checkbox to allow
intentional circular references. Set max iterations to 1

assume if cell A1 has a 1 in it, you want B1 to show the time it was placed
there

=IF(A1=1,IF(OR(B1="",B1=0),NOW(),B1),"")

use a custom number format under Format=Cells and use hh:mm:ss.000

another approach would be to

select the cell and do Ctrl+Shift+: (colon)

Or you could use a macro.

Sub SetTime()
Activecell.Value = Now()
End sub

--
Regards,
Tom Ogilvy






"Girlie Bloat" wrote:

I have set up a formula in Excel to record the time for riders in a bike race
who are doing a number of laps. Each time they come over the line I want to
put their race number in to a cell and for Excel to record the time. I have
successfully created a formula to do this (if the value of the cell into
which I put the race number is 0 the time is inserted into another cell).
However, once the time has been inserted I don't want it to change when I put
another race number in to the cell below. Does anyone know how I can do this?
Sarah



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I set the time in Excel

Thanks to all of you who so quickly responded to my plea. I used Tom's
formula and it seems to work. It's obviously only going to be as good as the
caller and typist but it's a much cheaper option than timing chips!
Thanks again to you all.
Sarah




"Tom Ogilvy" wrote:

If you want to use a formula, you would need to go to
Tools=Options=Calculation tab and click the iterations checkbox to allow
intentional circular references. Set max iterations to 1

assume if cell A1 has a 1 in it, you want B1 to show the time it was placed
there

=IF(A1=1,IF(OR(B1="",B1=0),NOW(),B1),"")

use a custom number format under Format=Cells and use hh:mm:ss.000

another approach would be to

select the cell and do Ctrl+Shift+: (colon)

Or you could use a macro.

Sub SetTime()
Activecell.Value = Now()
End sub

--
Regards,
Tom Ogilvy






"Girlie Bloat" wrote:

I have set up a formula in Excel to record the time for riders in a bike race
who are doing a number of laps. Each time they come over the line I want to
put their race number in to a cell and for Excel to record the time. I have
successfully created a formula to do this (if the value of the cell into
which I put the race number is 0 the time is inserted into another cell).
However, once the time has been inserted I don't want it to change when I put
another race number in to the cell below. Does anyone know how I can do this?
Sarah

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default How do I set the time in Excel

http://groups.google.co.uk/group/mic...ad61 707957a0

RBS


"Girlie Bloat" wrote in message
...
I have set up a formula in Excel to record the time for riders in a bike
race
who are doing a number of laps. Each time they come over the line I want
to
put their race number in to a cell and for Excel to record the time. I
have
successfully created a formula to do this (if the value of the cell into
which I put the race number is 0 the time is inserted into another cell).
However, once the time has been inserted I don't want it to change when I
put
another race number in to the cell below. Does anyone know how I can do
this?
Sarah


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
Excel 2007 calculate time between 2 date/time columns Kevo Excel Discussion (Misc queries) 8 April 25th 09 12:02 AM
Macro / function text time to 24hr excel time passed midnight fortotaling hr's Russmaz Excel Worksheet Functions 2 March 6th 09 04:58 AM
Time difference calculations, daylight savings time, Excel Tim Excel Discussion (Misc queries) 1 December 28th 06 04:18 PM
How do i convert unix time to Julian time in excel? Ken Excel Discussion (Misc queries) 1 December 14th 06 08:22 PM
Negative time should be allowed in Excel, eg time difference Bengt-Inge Larsson Excel Discussion (Misc queries) 2 October 13th 05 12:59 PM


All times are GMT +1. The time now is 07:45 PM.

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

About Us

"It's about Microsoft Excel"