Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
straight time, time and a half, and double time | Excel Discussion (Misc queries) | |||
Calculate Ending time using Start Time and Elapsed Time | Excel Worksheet Functions | |||
verify use of TIME Function, Find Quantity Level compare to time-d | Excel Discussion (Misc queries) | |||
Formula to find Stop Time from Start Time and Total Minutes | Excel Worksheet Functions | |||
Calculating days & time left from start date/time to end date/time | Excel Worksheet Functions |