LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Automatically filling date of today (without it changing tomorrow)

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col B
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 2 Then
n = Target.Row
If Excel.Range("B" & n).Value < "" Then
Excel.Range("A" & n).Value = Format(Now, "dd mmm yyyy hh:mm")
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.


Gord Dibben MS Excel MVP

On Tue, 27 Jun 2006 01:31:02 -0700, Jaydubs
wrote:

I have tw columns
Column A = Date
Column B = Questions

In column A I have a formula =IF(B2<"";TODAY();""). This means, that if I
type a letter in column B and press enter the date of today is automatically
filled in in Column A.

With the usage of Today() the date will change tomorrow, to tomorrow's date.
I don't want it to change. So what should happen is:

I type in a letter (or sentence or whatever) in column B today (which is 27
june 2006) is automatically entered. Tomorrow I want to check the question
and the date in front of it remains 27 june 2006.

Does this make sense?

Please help me......Thanx


 
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
Automatically Changing Cell Reference's when Pasting in Excel No I'm Spartacus Excel Discussion (Misc queries) 0 February 13th 06 01:01 PM
Changing date format in a footer Gord Dibben Excel Discussion (Misc queries) 2 December 9th 05 06:36 PM
how do i make a date change automatically if i change one before . dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 09:21 PM
How do I stop today() from updating date on saved spreadsheets? lionmark Excel Discussion (Misc queries) 2 January 4th 05 01:03 AM
prevent 4/5 in a cell automatically transfer to a date format kei Excel Discussion (Misc queries) 3 December 9th 04 11:52 AM


All times are GMT +1. The time now is 12:07 PM.

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"