Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Display Date that does not change everyday.
I want to display the date when money is received, and I do not want the date
to change everyday. Ex: =IF(K24="Yes",TODAY(),IF(K24="No",TODAY(),"")) However, this formula gives today's date and changes each day. I don't want it to change. |
#2
|
|||
|
|||
See
http://www.mcgimpsey.com/excel/timestamp.html Regards, Peo Sjoblom "heater" wrote: I want to display the date when money is received, and I do not want the date to change everyday. Ex: =IF(K24="Yes",TODAY(),IF(K24="No",TODAY(),"")) However, this formula gives today's date and changes each day. I don't want it to change. |
#3
|
|||
|
|||
I went to that link, but I am a novice in VB and could not get it to work. I
copied the following in VB, but nothing happened. Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("k24:k86"), .Cells) Is Nothing Then Application.EnableEvents = False If IsEmpty(.Value) Then .Offset(0, 1).ClearContents Else With .Offset(0, 1) .NumberFormat = "dd mmm yyyy hh:mm:ss" .Value = Now End With End If Application.EnableEvents = True End If End With End Sub How do you make the macro work? "Peo Sjoblom" wrote: See http://www.mcgimpsey.com/excel/timestamp.html Regards, Peo Sjoblom "heater" wrote: I want to display the date when money is received, and I do not want the date to change everyday. Ex: =IF(K24="Yes",TODAY(),IF(K24="No",TODAY(),"")) However, this formula gives today's date and changes each day. I don't want it to change. |
#4
|
|||
|
|||
heater
This is an event macro. Works when you change a cell value in the range k24:k86. Sticks a static date in the cell to the right of the one that got changed. The code is palced in the worksheet module. Right-click on the sheet tab and "View Code". Paste in there. Make a change like enter something in k24 and see date appear in l24 Gord Dibben Excel MVP On Fri, 8 Apr 2005 13:51:02 -0700, heater wrote: I went to that link, but I am a novice in VB and could not get it to work. I copied the following in VB, but nothing happened. Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("k24:k86"), .Cells) Is Nothing Then Application.EnableEvents = False If IsEmpty(.Value) Then .Offset(0, 1).ClearContents Else With .Offset(0, 1) .NumberFormat = "dd mmm yyyy hh:mm:ss" .Value = Now End With End If Application.EnableEvents = True End If End With End Sub How do you make the macro work? "Peo Sjoblom" wrote: See http://www.mcgimpsey.com/excel/timestamp.html Regards, Peo Sjoblom "heater" wrote: I want to display the date when money is received, and I do not want the date to change everyday. Ex: =IF(K24="Yes",TODAY(),IF(K24="No",TODAY(),"")) However, this formula gives today's date and changes each day. I don't want it to change. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Display Date that does not change everyday.
hi sorry to intrude... i also used the same code and it worked like a charm.
I just want to ask if i can specify where the date will be located. right now the date only appears to the next column of the data. and since want to monitor 2 columns ie (J:K), i want the date to appear in column L. Also i use the list function for my files and seems that the comp is taking such a long time to calculate, is there a way for me to limit the code to operate only within the list? Any help would be great! thanks! "heater" wrote: I went to that link, but I am a novice in VB and could not get it to work. I copied the following in VB, but nothing happened. Private Sub Worksheet_Change(ByVal Target As Excel.Range) With Target If .Count 1 Then Exit Sub If Not Intersect(Range("k24:k86"), .Cells) Is Nothing Then Application.EnableEvents = False If IsEmpty(.Value) Then .Offset(0, 1).ClearContents Else With .Offset(0, 1) .NumberFormat = "dd mmm yyyy hh:mm:ss" .Value = Now End With End If Application.EnableEvents = True End If End With End Sub How do you make the macro work? "Peo Sjoblom" wrote: See http://www.mcgimpsey.com/excel/timestamp.html Regards, Peo Sjoblom "heater" wrote: I want to display the date when money is received, and I do not want the date to change everyday. Ex: =IF(K24="Yes",TODAY(),IF(K24="No",TODAY(),"")) However, this formula gives today's date and changes each day. I don't want it to change. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help: Can I change the date formula from mm/dd/yyyy to "mmm-yy" et | Excel Discussion (Misc queries) | |||
Automatically Insert DATE, so that DATE will NOT change | Excel Worksheet Functions | |||
how do i make a date change automatically if i change one before . | Excel Discussion (Misc queries) | |||
How to change (delivery) days and automatically the receive date in an other cell? | Excel Worksheet Functions | |||
Combine & Display “Fixed” & “Automatically Updated” Date Parts | Excel Worksheet Functions |