Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default static "now" values

I have a 2-column ss that returns the current date and time in one column
when an entry is made in the neighboring column. I want the dates and times
to be static, meaning, I want those values to stay what they were when the
entry was made instead of all changing to the current date and time whenever
a new entry is made.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default static "now" values

A very tiny trick:

First click in the formula bar and then touch:

CNTRL-;
spacebar
CNTRL-SHFT-;
ENTER

This will enter the date followed by a space followed by the time in the cell
--
Gary''s Student - gsnu200807


"bflorox" wrote:

I have a 2-column ss that returns the current date and time in one column
when an entry is made in the neighboring column. I want the dates and times
to be static, meaning, I want those values to stay what they were when the
entry was made instead of all changing to the current date and time whenever
a new entry is made.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default static "now" values

This is what I have in column A:

=IF(B11="", "", NOW())

Can those key strokes replace "NOW()" ? I want it so that when the operator
enters a value in column B, a static date and time automatically appear in
column A. Is this possible?

Thanks.

"Gary''s Student" wrote:

A very tiny trick:

First click in the formula bar and then touch:

CNTRL-;
spacebar
CNTRL-SHFT-;
ENTER

This will enter the date followed by a space followed by the time in the cell
--
Gary''s Student - gsnu200807


"bflorox" wrote:

I have a 2-column ss that returns the current date and time in one column
when an entry is made in the neighboring column. I want the dates and times
to be static, meaning, I want those values to stay what they were when the
entry was made instead of all changing to the current date and time whenever
a new entry is made.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default static "now" values

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

--


Regards,


Peo Sjoblom

"bflorox" wrote in message
...
This is what I have in column A:

=IF(B11="", "", NOW())

Can those key strokes replace "NOW()" ? I want it so that when the
operator
enters a value in column B, a static date and time automatically appear in
column A. Is this possible?

Thanks.

"Gary''s Student" wrote:

A very tiny trick:

First click in the formula bar and then touch:

CNTRL-;
spacebar
CNTRL-SHFT-;
ENTER

This will enter the date followed by a space followed by the time in the
cell
--
Gary''s Student - gsnu200807


"bflorox" wrote:

I have a 2-column ss that returns the current date and time in one
column
when an entry is made in the neighboring column. I want the dates and
times
to be static, meaning, I want those values to stay what they were when
the
entry was made instead of all changing to the current date and time
whenever
a new entry is made.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default static "now" values

Put the following event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set B = Range("B:B")
If Intersect(t, B) Is Nothing Then Exit Sub
Application.EnableEvents = False
t.Offset(0, -1).Value = Now
Application.EnableEvents = True
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200807


"bflorox" wrote:

This is what I have in column A:

=IF(B11="", "", NOW())

Can those key strokes replace "NOW()" ? I want it so that when the operator
enters a value in column B, a static date and time automatically appear in
column A. Is this possible?

Thanks.

"Gary''s Student" wrote:

A very tiny trick:

First click in the formula bar and then touch:

CNTRL-;
spacebar
CNTRL-SHFT-;
ENTER

This will enter the date followed by a space followed by the time in the cell
--
Gary''s Student - gsnu200807


"bflorox" wrote:

I have a 2-column ss that returns the current date and time in one column
when an entry is made in the neighboring column. I want the dates and times
to be static, meaning, I want those values to stay what they were when the
entry was made instead of all changing to the current date and time whenever
a new entry is made.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default static "now" values

Perfect! Thanks!

"Gary''s Student" wrote:

Put the following event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set B = Range("B:B")
If Intersect(t, B) Is Nothing Then Exit Sub
Application.EnableEvents = False
t.Offset(0, -1).Value = Now
Application.EnableEvents = True
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200807


"bflorox" wrote:

This is what I have in column A:

=IF(B11="", "", NOW())

Can those key strokes replace "NOW()" ? I want it so that when the operator
enters a value in column B, a static date and time automatically appear in
column A. Is this possible?

Thanks.

"Gary''s Student" wrote:

A very tiny trick:

First click in the formula bar and then touch:

CNTRL-;
spacebar
CNTRL-SHFT-;
ENTER

This will enter the date followed by a space followed by the time in the cell
--
Gary''s Student - gsnu200807


"bflorox" wrote:

I have a 2-column ss that returns the current date and time in one column
when an entry is made in the neighboring column. I want the dates and times
to be static, meaning, I want those values to stay what they were when the
entry was made instead of all changing to the current date and time whenever
a new entry is made.

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 - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How to create a scatter chart with 2 "X" values with common "Y"s M_LeDuc Charts and Charting in Excel 2 September 13th 07 10:26 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
How to make number of "static" fields stay the same when copying? MrHaugen Excel Discussion (Misc queries) 2 July 11th 06 08:40 PM
Changing "returned" values from "0" to "blank" LATATC Excel Worksheet Functions 2 October 20th 05 04:41 PM


All times are GMT +1. The time now is 04:41 AM.

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"