#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default now() just one time

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default now() just one time

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default now() just one time

I think you meant CNTRL-SHFT-:
(colon instead of semicolon)

Regards,
Stefi


€˛Gary''s Student€¯ ezt Ć*rta:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default now() just one time

Using the SHIFT key gets you the : anyway.
--
Gary''s Student - gsnu200841


"Stefi" wrote:

I think you meant CNTRL-SHFT-:
(colon instead of semicolon)

Regards,
Stefi


€˛Gary''s Student€¯ ezt Ć*rta:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default now() just one time

Now I see the point: it depends on the keyboard used. On my keyboard
(Hungarian) there is fullstop under colon, semicolon is on another key in
AltGr combination.
Stefi


€˛Gary''s Student€¯ ezt Ć*rta:

Using the SHIFT key gets you the : anyway.
--
Gary''s Student - gsnu200841


"Stefi" wrote:

I think you meant CNTRL-SHFT-:
(colon instead of semicolon)

Regards,
Stefi


€˛Gary''s Student€¯ ezt Ć*rta:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default now() just one time

Stefi wrote on Wed, 25 Mar 2009 04:23:02 -0700:

€˛Gary''s Student€¯ ezt Ć*rta:


Using the SHIFT key gets you the : anyway.
--
Gary''s Student - gsnu200841

"Stefi" wrote:

I think you meant CNTRL-SHFT-:
(colon instead of semicolon)

Regards,
Stefi

€˛Gary''s Student€¯ ezt Ć*rta:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841

"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1.
But i need the time to appear just once. If i close the
workbook and open it again, the time to remin intact. I
want the code to work just once. And olso, if i add
something in A1 the code to remain intact. If the first
time i write something in A1 the time will be 12:00, then
this time to remain displayed all the time. can this be
done? Thanks in advance.


Just a small reminder that I personally find useful:


http://www.cpearson.com/excel/KeyboardShortcuts.htm


--

James Silverton
Potomac, Maryland

Email, with obvious alterations: not.jim.silverton.at.verizon.not

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default now() just one time

Hi,
i need something more like:
=if A1""(B1(CNTRL-SHFT-;)) or something like this. The code to be activated
when i write something in A1 and to work only one time, and the result to
remain the same.


A B
1 gsp 12:30
2 bgr 12:45
3

If A3 is empty, B3 to be empty as well.
Thanks in advance.






"Gary''s Student" wrote:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default now() just one time

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
N = Target.Row
If Me.Range("A" & N).Value < "" Then
Me.Range("B" & N).Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP

On Wed, 25 Mar 2009 13:37:02 -0700, puiuluipui
wrote:

Hi,
i need something more like:
=if A1""(B1(CNTRL-SHFT-;)) or something like this. The code to be activated
when i write something in A1 and to work only one time, and the result to
remain the same.


A B
1 gsp 12:30
2 bgr 12:45
3

If A3 is empty, B3 to be empty as well.
Thanks in advance.






"Gary''s Student" wrote:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default now() just one time

Hi, it's working, but if i add someting in cell A1 or another cell in column
A, the time its changing. Sometimes i have to change the text in some cell
or to add something, but i don't want the time to be changed. I need the
first "time" that code generated.
Thank you so much.





"Gord Dibben" a scris:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
N = Target.Row
If Me.Range("A" & N).Value < "" Then
Me.Range("B" & N).Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP

On Wed, 25 Mar 2009 13:37:02 -0700, puiuluipui
wrote:

Hi,
i need something more like:
=if A1""(B1(CNTRL-SHFT-;)) or something like this. The code to be activated
when i write something in A1 and to work only one time, and the result to
remain the same.


A B
1 gsp 12:30
2 bgr 12:45
3

If A3 is empty, B3 to be empty as well.
Thanks in advance.






"Gary''s Student" wrote:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.



  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default now() just one time

Hi, is there a way to make your code start from "A5" ?

Thanks!

"Gord Dibben" a scris:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
N = Target.Row
If Me.Range("A" & N).Value < "" Then
Me.Range("B" & N).Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP

On Wed, 25 Mar 2009 13:37:02 -0700, puiuluipui
wrote:

Hi,
i need something more like:
=if A1""(B1(CNTRL-SHFT-;)) or something like this. The code to be activated
when i write something in A1 and to work only one time, and the result to
remain the same.


A B
1 gsp 12:30
2 bgr 12:45
3

If A3 is empty, B3 to be empty as well.
Thanks in advance.






"Gary''s Student" wrote:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.





  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default now() just one time

Check your later post.

puiuluipui wrote:

Hi, is there a way to make your code start from "A5" ?

Thanks!

"Gord Dibben" a scris:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col A
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 1 Then
N = Target.Row
If Me.Range("A" & N).Value < "" Then
Me.Range("B" & N).Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP

On Wed, 25 Mar 2009 13:37:02 -0700, puiuluipui
wrote:

Hi,
i need something more like:
=if A1""(B1(CNTRL-SHFT-;)) or something like this. The code to be activated
when i write something in A1 and to work only one time, and the result to
remain the same.


A B
1 gsp 12:30
2 bgr 12:45
3

If A3 is empty, B3 to be empty as well.
Thanks in advance.






"Gary''s Student" wrote:

CNTRL-SHFT-;
--
Gary''s Student - gsnu200841


"puiuluipui" wrote:

Hi, i need a small code with now().

When i write some text in A1, the time to appear in B1. But i need the time
to appear just once. If i close the workbook and open it again, the time to
remin intact. I want the code to work just once. And olso, if i add something
in A1 the code to remain intact.
If the first time i write something in A1 the time will be 12:00, then this
time to remain displayed all the time.
can this be done?
Thanks in advance.




--

Dave Peterson
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
straight time, time and a half, and double time Jeremy Excel Discussion (Misc queries) 3 September 23rd 08 09:03 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
Formula to find Stop Time from Start Time and Total Minutes Jonathan Bickett Excel Worksheet Functions 5 March 7th 07 05:22 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM


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