![]() |
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. |
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. |
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. |
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. |
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. |
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 |
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. |
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. |
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. |
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. |
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 |
All times are GMT +1. The time now is 05:42 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com